基础题目第三道
AC代码
import java.util.*;
public class Main
{
public static void main(String[]args){
int [] a = new int[3];
Scanner s = new Scanner(System.in);
for (int i =0;i<3 ;i++ )
{
a[i]=s.nextInt();
}
Random rand = new Random(a[2]);
int t=-1;
for (int i =0;i<a[0] ;i++ )
{
t = rand.nextInt(a[1]);
}
System.out.println(t);
}
}