結果

問題 No.333 門松列を数え上げ
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-01-15 22:39:22
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 2,183 ms
コンパイル使用メモリ 74,852 KB
実行使用メモリ 57,596 KB
最終ジャッジ日時 2023-10-19 23:23:13
合計ジャッジ時間 3,891 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
57,432 KB
testcase_01 AC 128 ms
57,452 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 128 ms
57,400 KB
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Test {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String str1 = in.next();
		String str2 = in.next();
		int A = Integer.parseInt(str1);
		int B = Integer.parseInt(str2);
		
		if(A > B) {
			System.out.println(2000000000 - A - B + 1);
		}
		if(A < B) {
			System.out.println(A - 1);
		}
	}
}
0