結果

問題 No.333 門松列を数え上げ
ユーザー mits58mits58
提出日時 2016-07-02 16:58:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 281 bytes
コンパイル時間 2,398 ms
コンパイル使用メモリ 74,292 KB
実行使用メモリ 41,776 KB
最終ジャッジ日時 2024-04-20 06:00:22
合計ジャッジ時間 4,047 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,368 KB
testcase_01 AC 135 ms
41,648 KB
testcase_02 AC 136 ms
41,316 KB
testcase_03 AC 136 ms
41,776 KB
testcase_04 AC 135 ms
41,412 KB
testcase_05 AC 133 ms
41,344 KB
testcase_06 AC 133 ms
41,720 KB
testcase_07 AC 134 ms
41,468 KB
testcase_08 AC 135 ms
41,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			int a=sc.nextInt();
			int b=sc.nextInt();
			if(a<b) System.out.println(b-2);
			else System.out.println(2000000000-b-1);
		}
	}
}
0