結果
| 問題 |
No.2385 Parse Integer with Radix
|
| コンテスト | |
| ユーザー |
komkompi
|
| 提出日時 | 2023-07-21 21:38:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 348 bytes |
| コンパイル時間 | 297 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 64,896 KB |
| 最終ジャッジ日時 | 2024-09-21 23:01:08 |
| 合計ジャッジ時間 | 1,708 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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