結果

問題 No.1113 二つの整数 / Two Integers
ユーザー 遭難者遭難者
提出日時 2020-10-13 18:37:52
言語 Java19
(openjdk 21)
結果
AC  
実行時間 107 ms / 1,000 ms
コード長 442 bytes
コンパイル時間 4,168 ms
コンパイル使用メモリ 71,584 KB
実行使用メモリ 56,272 KB
最終ジャッジ日時 2023-09-28 00:13:20
合計ジャッジ時間 6,900 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
56,068 KB
testcase_01 AC 102 ms
55,908 KB
testcase_02 AC 106 ms
55,972 KB
testcase_03 AC 102 ms
55,812 KB
testcase_04 AC 103 ms
55,956 KB
testcase_05 AC 101 ms
55,920 KB
testcase_06 AC 102 ms
56,060 KB
testcase_07 AC 99 ms
55,932 KB
testcase_08 AC 101 ms
56,120 KB
testcase_09 AC 97 ms
56,064 KB
testcase_10 AC 100 ms
56,020 KB
testcase_11 AC 99 ms
55,596 KB
testcase_12 AC 97 ms
55,816 KB
testcase_13 AC 96 ms
55,764 KB
testcase_14 AC 101 ms
55,884 KB
testcase_15 AC 103 ms
53,888 KB
testcase_16 AC 102 ms
56,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		long a = Long.parseLong(sc.next());
		long b = Long.parseLong(sc.next());
		long t = a % b;
		while(t != 0){
			a = b;
			b = t;
			t = a % b;
		}
		if(Math.sqrt(b) % 1 == 0) ou.println("Odd");
		else ou.println("Even");
		ou.flush();
		sc.close();
	}
}
0