結果

問題 No.333 門松列を数え上げ
ユーザー Tsukasa_Type
提出日時 2018-02-12 21:47:17
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 344 bytes
コンパイル時間 2,054 ms
コンパイル使用メモリ 74,260 KB
実行使用メモリ 54,368 KB
最終ジャッジ日時 2024-11-25 09:40:32
合計ジャッジ時間 3,920 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 2 WA * 5
権限があれば一括ダウンロードができます

ソースコード

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;
		}
		System.out.println(right);
	}
}
0