結果
問題 | No.423 ハムスター語初級(数詞) |
ユーザー | tomatonosuke |
提出日時 | 2016-09-22 23:56:23 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 321 bytes |
コンパイル時間 | 120 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-04-28 20:01:16 |
合計ジャッジ時間 | 1,002 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 30 ms
10,752 KB |
testcase_01 | AC | 30 ms
10,496 KB |
testcase_02 | AC | 31 ms
10,496 KB |
testcase_03 | WA | - |
testcase_04 | AC | 30 ms
10,496 KB |
testcase_05 | RE | - |
testcase_06 | AC | 31 ms
10,624 KB |
testcase_07 | WA | - |
testcase_08 | AC | 31 ms
10,624 KB |
testcase_09 | AC | 31 ms
10,496 KB |
ソースコード
targ = input() temp = "" num = "" for t in targ: temp += t if temp == "hamh": temp = "h" num += '0' elif temp == "hamu": temp = "" num += '1' temp = bin(int(num,2) * 2)[2:] ans = "" for t in temp: if t == '0': ans += "ham" else: ans += "hamu" print(ans)