結果
| 問題 | No.2385 Parse Integer with Radix |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-21 21:24:19 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 2,000 ms |
| コード長 | 570 bytes |
| 記録 | |
| コンパイル時間 | 117 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 86,016 KB |
| 最終ジャッジ日時 | 2026-04-10 04:27:47 |
| 合計ジャッジ時間 | 2,350 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 11 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
q = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
# alist.append(list(map(int,input().split())))
for i in range(q):
s = input()
if len(s) <= 1:
print(int(s))
elif s[1] == 'b':
print(int(s,base=2))
elif s[1] == 'o':
print(int(s,base=8))
elif s[1] == 'x':
print(int(s,base=16))
else:
print(int(s))