結果

問題 No.1027 U+1F4A0
ユーザー htensaihtensai
提出日時 2020-05-13 11:20:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 1,891 ms
コンパイル使用メモリ 71,320 KB
実行使用メモリ 56,208 KB
最終ジャッジ日時 2023-10-12 16:53:39
合計ジャッジ時間 6,410 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,652 KB
testcase_01 AC 120 ms
55,656 KB
testcase_02 AC 119 ms
55,576 KB
testcase_03 AC 121 ms
55,564 KB
testcase_04 AC 121 ms
55,696 KB
testcase_05 AC 121 ms
56,056 KB
testcase_06 AC 123 ms
55,592 KB
testcase_07 AC 120 ms
55,828 KB
testcase_08 AC 119 ms
55,736 KB
testcase_09 AC 120 ms
55,824 KB
testcase_10 AC 120 ms
55,712 KB
testcase_11 AC 119 ms
55,708 KB
testcase_12 AC 120 ms
54,176 KB
testcase_13 AC 121 ms
55,440 KB
testcase_14 AC 120 ms
56,028 KB
testcase_15 AC 120 ms
56,052 KB
testcase_16 AC 119 ms
55,504 KB
testcase_17 AC 119 ms
55,596 KB
testcase_18 AC 119 ms
55,856 KB
testcase_19 AC 121 ms
56,208 KB
testcase_20 AC 122 ms
55,592 KB
testcase_21 AC 121 ms
55,720 KB
testcase_22 AC 122 ms
55,796 KB
testcase_23 AC 126 ms
55,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int d1 = sc.nextInt();
		int d2 = sc.nextInt();
		int count;
		if (d1 * 2 < d2) { 
		    count = 0;
		} else if (d1 * 2 == d2) {
		    count = 4;
		} else if (d1 < d2) {
		    count = 8;
		} else if (d1 == d2) {
		    count = 4;
		} else {
		    count = 0;
		}
		System.out.println(count);
	}
}
0