結果
| 問題 |
No.423 ハムスター語初級(数詞)
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-01-19 03:16:38 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 2,000 ms |
| コード長 | 277 bytes |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2024-06-28 18:35:41 |
| 合計ジャッジ時間 | 1,148 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = read().rstrip().decode()
S = S.replace('hamu','1').replace('ham','0')
x = int(S, 2)
x *= 2
S = bin(x)[2:].replace('1','hamu').replace('0','ham')
print(S)
maspy