結果

問題 No.201 yukicoderじゃんけん
ユーザー 練習生
提出日時 2015-08-18 13:22:59
言語 Java
(openjdk 23)
結果
AC  
実行時間 174 ms / 5,000 ms
コード長 585 bytes
コンパイル時間 3,051 ms
コンパイル使用メモリ 75,032 KB
実行使用メモリ 54,436 KB
最終ジャッジ日時 2024-07-18 10:09:46
合計ジャッジ時間 6,400 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.Scanner;
public class No201 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 一人目を入力
		String name1 = sc.next();
		BigInteger p1 = new BigInteger(sc.next());
		String x1 = sc.next();
		// 二人目を入力
		String name2 = sc.next();
		BigInteger p2 = new BigInteger(sc.next());
		String x2 = sc.next();
		// 判定
		if(p1.compareTo(p2) == 1){
			System.out.println(name1);
		}else if(p1.compareTo(p2) == -1){
			System.out.println(name2);
		}else{
			System.out.println("-1");
		}
	}
}
0