小游戏(石头剪刀布)
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("请输入:");
int a = sc.nextInt();
int random=(int)(Math.random()*3)+1;
System.out.println(random);
boolean i = (a == 1 && random == 3)
|| (a == 2 && random == 1)
||(a == 3 && random == 2);
// a=石头, b=剪刀, c=布。
if (a == random){ //平局
System.out.println("平局");
}else if (i) {
System.out.println("你赢了");
} else {
System.out.println("你输了");
}
网络的怎么连接的-浏览器
navicat 快捷键
jekins—持续集成
【Back to Basics】查询区间 $a[0, r)$ 上大于等于 $k$ 的数有多少个
【面试向】从洗牌算法说起
【经典问题】maximum subset sum of vectors
Codeforces 1209D Cow and Snacks
Maximum XOR Sum 系列问题
【C++ 补习】Copy Control