結果
問題 |
No.2385 Parse Integer with Radix
|
ユーザー |
![]() |
提出日時 | 2023-07-21 21:47:18 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 303 ms |
コンパイル使用メモリ | 82,816 KB |
実行使用メモリ | 52,480 KB |
最終ジャッジ日時 | 2024-09-21 23:15:11 |
合計ジャッジ時間 | 1,394 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 11 |
ソースコード
import sys input = sys.stdin.readline Q = int(input()) mp = { 'b': 2, 'o': 8, 'x': 16 } for _ in range(Q): S = input().rstrip() if len(S) >= 3 and S[1] in mp: print(int(S, mp[S[1]])) else: print(int(S))