結果
| 問題 | No.2385 Parse Integer with Radix |
| コンテスト | |
| ユーザー |
komkompi
|
| 提出日時 | 2023-07-21 21:38:28 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 348 bytes |
| 記録 | |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 96,460 KB |
| 実行使用メモリ | 91,472 KB |
| 最終ジャッジ日時 | 2026-09-02 00:07:03 |
| 合計ジャッジ時間 | 3,242 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_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