結果

問題 No.333 門松列を数え上げ
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-12 21:46:41
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 348 bytes
コンパイル時間 2,082 ms
コンパイル使用メモリ 74,236 KB
実行使用メモリ 41,612 KB
最終ジャッジ日時 2024-05-04 03:14:29
合計ジャッジ時間 3,331 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.util.*;

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