結果
問題 | No.884 Eat and Add |
ユーザー |
|
提出日時 | 2019-09-23 14:43:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 376 bytes |
コンパイル時間 | 151 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,264 KB |
最終ジャッジ日時 | 2024-09-19 04:26:02 |
合計ジャッジ時間 | 4,772 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 9 |
ソースコード
if __name__ == "__main__": apples = int(input(), 2) print(bin(apples)) score = 0 while apples != 0: t = apples & 3 if t == 1: score += 1 apples >>= 2 elif t == 3: score += 1 apples += 1 elif t == 0: apples >>= 2 else: apples >>= 1 print(score)