結果

問題 No.2789 hako111223’s Master Thesis
ユーザー ks2mks2m
提出日時 2024-06-21 22:52:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 150 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 2,297 ms
コンパイル使用メモリ 74,692 KB
実行使用メモリ 54,664 KB
最終ジャッジ日時 2024-06-21 22:52:41
合計ジャッジ時間 5,784 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
54,112 KB
testcase_01 AC 111 ms
53,872 KB
testcase_02 AC 121 ms
54,120 KB
testcase_03 AC 130 ms
54,444 KB
testcase_04 AC 106 ms
52,956 KB
testcase_05 AC 150 ms
54,368 KB
testcase_06 AC 119 ms
54,236 KB
testcase_07 AC 107 ms
54,556 KB
testcase_08 AC 117 ms
53,852 KB
testcase_09 AC 120 ms
54,024 KB
testcase_10 AC 107 ms
53,060 KB
testcase_11 AC 119 ms
54,088 KB
testcase_12 AC 116 ms
54,144 KB
testcase_13 AC 116 ms
54,280 KB
testcase_14 AC 108 ms
53,472 KB
testcase_15 AC 115 ms
53,880 KB
testcase_16 AC 119 ms
54,320 KB
testcase_17 AC 122 ms
54,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		sc.close();

		int e = b + 31 - a;
		if (c <= e) {
			System.out.println(1);
		} else if (d <= e) {
			System.out.println(2);
		} else {
			System.out.println(3);
		}
	}
}
0