結果

問題 No.333 門松列を数え上げ
ユーザー 37zigen37zigen
提出日時 2016-03-11 02:20:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 2,062 ms
コンパイル使用メモリ 74,452 KB
実行使用メモリ 57,692 KB
最終ジャッジ日時 2023-10-25 04:15:24
合計ジャッジ時間 4,091 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
57,692 KB
testcase_01 AC 127 ms
57,452 KB
testcase_02 AC 128 ms
57,560 KB
testcase_03 AC 130 ms
57,352 KB
testcase_04 AC 129 ms
57,408 KB
testcase_05 AC 129 ms
57,524 KB
testcase_06 AC 132 ms
57,660 KB
testcase_07 AC 139 ms
57,496 KB
testcase_08 AC 128 ms
57,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Date;
import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		long exec_time=new Date().getTime();
		Scanner sc=new Scanner(System.in);
		int a,b,ans;
		ans=0;
		a=sc.nextInt();
		b=sc.nextInt();
		if(b>a){
			ans=b-2;
		}else if(b<a){
			ans=2000000000-b-1;
		}
		System.out.println(ans);
	}
}
0