当前位置: 代码迷 >> 综合 >> HDOJ 1976 Software Version
  详细解决方案

HDOJ 1976 Software Version

热度:18   发布时间:2023-10-21 19:00:15.0

HDACM 1976

水题

import java.util.Scanner;public class Main{public static void main(String[] args) {Scanner sc = new Scanner(System.in);int t = sc.nextInt();while(t-->0){int a[] = new int[3];int b[] = new int[3];for (int i = 0; i < a.length; i++) {a[i] = sc.nextInt();}for (int i = 0; i < b.length; i++) {b[i] = sc.nextInt();}boolean boo = true;for (int i = 0; i < b.length; i++) {if (a[i]>b[i]) {System.out.println("First");boo = false;break;}if (a[i]<b[i]) {System.out.println("Second");boo = false;break;}}if (boo) {System.out.println("Same");}}sc.close();}
}
  相关解决方案