結果
問題 |
No.423 ハムスター語初級(数詞)
|
ユーザー |
|
提出日時 | 2016-10-14 06:13:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 257 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-11-22 05:53:31 |
合計ジャッジ時間 | 998 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 9 |
ソースコード
n = input() s_flg = 0 s = "" for i in n[::-1]: if s_flg == 0 and i == "u": s += "1" s_flg = 1 elif s_flg == 0 and i == "m": s += "0" s_flg = 1 elif s_flg == 1 and i == "h": s_flg = 0 print(int(s[::-1], 2))