結果

問題 No.333 門松列を数え上げ
ユーザー mitsuomitsuo
提出日時 2016-05-04 13:47:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 510 bytes
コンパイル時間 2,616 ms
コンパイル使用メモリ 80,112 KB
実行使用メモリ 41,896 KB
最終ジャッジ日時 2024-04-15 11:17:11
合計ジャッジ時間 4,678 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 150 ms
41,156 KB
testcase_01 AC 149 ms
41,896 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 147 ms
41,256 KB
testcase_05 AC 160 ms
41,152 KB
testcase_06 AC 156 ms
41,596 KB
testcase_07 AC 153 ms
41,648 KB
testcase_08 AC 149 ms
41,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] input = new String[1];
		int i = 0;
		while (sc.hasNext()) {
			input[i] = sc.nextLine();
			i++;
		}

		System.out.println(solve(input));

		sc.close();
	}

	public static long solve(String[] in) {
		long a = Long.valueOf(in[0].split(" ")[0]);
		long b = Long.valueOf(in[0].split(" ")[1]);
		if(a < b){
			return a - 1L;
		}else{
			return 2000000000 - b - 1L;
		}
	}
}
0