結果
| 問題 |
No.423 ハムスター語初級(数詞)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-02 07:20:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 317 bytes |
| コンパイル時間 | 293 ms |
| コンパイル使用メモリ | 82,272 KB |
| 実行使用メモリ | 53,712 KB |
| 最終ジャッジ日時 | 2024-11-25 01:23:56 |
| 合計ジャッジ時間 | 1,111 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 9 |
ソースコード
def solve():
numarr = ["hamu", "ham"]
s = input()
numstr = ""
for idx in range(2):
s = s.replace(numarr[idx], str(1 - idx))
ansnum = int(s, 2) * 2
ans = ""
while ansnum > 0:
ans += numarr[ansnum & 1]
ansnum >>= 1
print(ans)
if __name__=="__main__":
solve()