結果

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

ソースコード

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 = center - 2;
		}
		else if (left > center) {
			right = 2000000000 - left;
		}
		System.out.println(right);
	}
}
0