結果

問題 No.333 門松列を数え上げ
ユーザー shinwisteriashinwisteria
提出日時 2018-03-14 20:02:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 4,000 ms
コンパイル使用メモリ 73,284 KB
実行使用メモリ 56,172 KB
最終ジャッジ日時 2023-08-19 09:35:56
合計ジャッジ時間 5,915 ms
ジャッジサーバーID
(参考情報)
judge9 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,616 KB
testcase_01 AC 124 ms
55,616 KB
testcase_02 AC 123 ms
55,712 KB
testcase_03 AC 123 ms
55,272 KB
testcase_04 AC 123 ms
56,172 KB
testcase_05 AC 124 ms
55,948 KB
testcase_06 AC 124 ms
55,988 KB
testcase_07 AC 124 ms
55,580 KB
testcase_08 AC 122 ms
56,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con339 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int a = s.nextInt() , b = s.nextInt();
		s.close();

		int d;
		if(a < b){
			d = b - 2;
		}else{
			d = 1999999999 - b;
		}
		System.out.println(d);

	}

}
0