結果

問題 No.333 門松列を数え上げ
ユーザー htensaihtensai
提出日時 2019-11-21 19:14:15
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 304 bytes
コンパイル時間 2,282 ms
コンパイル使用メモリ 73,656 KB
実行使用メモリ 54,144 KB
最終ジャッジ日時 2024-04-19 05:03:32
合計ジャッジ時間 4,142 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
41,152 KB
testcase_01 AC 124 ms
39,768 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 134 ms
40,976 KB
testcase_08 AC 137 ms
41,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		final int MAX = 2000000000;
		int a = sc.nextInt();
		int b = sc.nextInt();
		if (a < b) {
		    System.out.println(a - 1);
		} else {
		    System.out.println(MAX - a);
		}
	}
}
0