結果

問題 No.1027 U+1F4A0
ユーザー ks2mks2m
提出日時 2020-04-17 21:25:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 462 bytes
コンパイル時間 2,140 ms
コンパイル使用メモリ 74,400 KB
実行使用メモリ 54,476 KB
最終ジャッジ日時 2024-04-14 12:59:59
合計ジャッジ時間 6,257 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
54,324 KB
testcase_01 AC 131 ms
54,096 KB
testcase_02 AC 129 ms
54,176 KB
testcase_03 AC 115 ms
52,844 KB
testcase_04 AC 129 ms
53,860 KB
testcase_05 AC 131 ms
54,476 KB
testcase_06 AC 128 ms
54,268 KB
testcase_07 AC 117 ms
53,132 KB
testcase_08 AC 132 ms
54,240 KB
testcase_09 AC 131 ms
53,844 KB
testcase_10 AC 129 ms
54,204 KB
testcase_11 AC 128 ms
53,972 KB
testcase_12 AC 119 ms
52,748 KB
testcase_13 AC 131 ms
53,880 KB
testcase_14 AC 117 ms
52,776 KB
testcase_15 AC 129 ms
54,132 KB
testcase_16 AC 130 ms
53,924 KB
testcase_17 AC 130 ms
54,228 KB
testcase_18 AC 130 ms
54,036 KB
testcase_19 AC 132 ms
54,232 KB
testcase_20 AC 131 ms
54,088 KB
testcase_21 AC 131 ms
53,960 KB
testcase_22 AC 129 ms
54,064 KB
testcase_23 AC 128 ms
54,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int d1 = sc.nextInt();
		double d2 = sc.nextInt();
		sc.close();

		if (d1 > d2) {
			System.out.println(0);
		} else if (d1 == d2) {
			System.out.println(4);
		} else if (d1 < d2 / 2) {
			System.out.println(0);
		} else if (d1 == d2 / 2) {
			System.out.println(4);
		} else {
			System.out.println(8);
		}
	}
}
0