結果

問題 No.2224 UFO Game
ユーザー norikamenorikame
提出日時 2022-12-10 17:52:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 2,924 ms
コンパイル使用メモリ 71,372 KB
実行使用メモリ 56,368 KB
最終ジャッジ日時 2023-10-11 05:16:09
合計ジャッジ時間 5,623 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
56,048 KB
testcase_01 AC 116 ms
55,656 KB
testcase_02 AC 118 ms
55,784 KB
testcase_03 AC 115 ms
55,728 KB
testcase_04 AC 117 ms
55,984 KB
testcase_05 AC 113 ms
55,848 KB
testcase_06 AC 115 ms
56,368 KB
testcase_07 AC 117 ms
55,836 KB
testcase_08 AC 117 ms
55,608 KB
testcase_09 AC 118 ms
55,860 KB
testcase_10 AC 114 ms
56,056 KB
testcase_11 AC 119 ms
55,788 KB
testcase_12 AC 117 ms
53,704 KB
testcase_13 AC 117 ms
55,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// 

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (s.charAt(0) == 'x') System.out.println((1L<<32)-Integer.parseInt(s.substring(1)));
        else System.out.println(Integer.parseInt(s));
        sc.close();
    }
}
0