結果
| 問題 |
No.2385 Parse Integer with Radix
|
| コンテスト | |
| ユーザー |
mymelochan
|
| 提出日時 | 2023-07-21 21:24:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 54 ms / 2,000 ms |
| コード長 | 741 bytes |
| コンパイル時間 | 233 ms |
| コンパイル使用メモリ | 82,440 KB |
| 実行使用メモリ | 55,296 KB |
| 最終ジャッジ日時 | 2024-09-21 22:38:22 |
| 合計ジャッジ時間 | 1,563 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 11 |
ソースコード
#############################################################
import sys
sys.setrecursionlimit(10**7)
from heapq import heappop,heappush
from collections import deque,defaultdict,Counter
from bisect import bisect_left, bisect_right
from itertools import product,combinations,permutations
ipt = sys.stdin.readline
def iin():
return int(ipt())
def lmin():
return list(map(int,ipt().split()))
MOD = 998244353
#############################################################
for _ in range(iin()):
S = input()
if len(S) == 1:
print(S)
elif S[:2] == "0b":
print(int(S[2:],2))
elif S[:2] == "0o":
print(int(S[2:],8))
elif S[:2] == "0x":
print(int(S[2:],16))
else:
print(S)
mymelochan