結果

問題 No.333 門松列を数え上げ
ユーザー atkrym
提出日時 2016-10-22 18:56:30
言語 Java
(openjdk 23)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 2,257 ms
コンパイル使用メモリ 74,032 KB
実行使用メモリ 41,424 KB
最終ジャッジ日時 2024-11-23 17:17:14
合計ジャッジ時間 4,108 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.text.*;

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