結果
| 問題 | No.2385 Parse Integer with Radix |
| コンテスト | |
| ユーザー |
komkompi
|
| 提出日時 | 2023-07-21 21:38:28 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 348 bytes |
| 記録 | |
| コンパイル時間 | 215 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 65,408 KB |
| 最終ジャッジ日時 | 2026-04-10 04:42:04 |
| 合計ジャッジ時間 | 1,591 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | RE * 11 |
ソースコード
# coding: utf-8
# Your code here!
import numpy as np
Q=int(input())
for _ in range(Q):
S=input()
encode,num=S[:2],S[2:]
if encode=="0b":
ans=int(num,2)
elif encode=="0o":
ans=int(num,8)
elif encode=="0x":
ans=int(num,16)
else:
ans=S
print(ans)
komkompi