結果

問題 No.2385 Parse Integer with Radix
ユーザー aaaaaaaaaa2230
提出日時 2023-07-21 21:44:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,836 KB
実行使用メモリ 52,480 KB
最終ジャッジ日時 2024-09-21 23:11:20
合計ジャッジ時間 1,495 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

q = int(input())
for _ in range(q):
    S = input()

    if S.startswith("0b"):
        print(int(S[2:],2))
    elif S.startswith("0x"):
        print(int(S[2:],16))
    elif S.startswith("0o"):
        print(int(S[2:],8))
    else:

        print(int(S))
0