結果
問題 | No.2063 ±2^k operations (easy) |
ユーザー |
![]() |
提出日時 | 2022-09-03 16:36:52 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 51 ms / 2,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 504 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 67,328 KB |
最終ジャッジ日時 | 2024-11-17 06:43:57 |
合計ジャッジ時間 | 2,585 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
n = input() + "0"cnt = 0cnt1 = 0cnt2 = 0mark = "0"for e in n:if e == "1":if mark == "0":cnt = 1mark = "1"else:cnt += 1else:if mark == "1":if cnt == 1:cnt1 += 1else:cnt2 += 1mark = "0"if cnt1 == 2 and cnt2 == 0:print("Yes")elif cnt1 == 0 and cnt2 == 1:print("Yes")else:print("No")