結果
| 問題 | No.2063 ±2^k operations (easy) |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 20:32:01 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 33 ms / 2,000 ms |
| + 742µs | |
| コード長 | 601 bytes |
| 記録 | |
| コンパイル時間 | 74 ms |
| コンパイル使用メモリ | 80,748 KB |
| 実行使用メモリ | 74,016 KB |
| 最終ジャッジ日時 | 2026-10-11 01:00:37 |
| 合計ジャッジ時間 | 2,241 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
s = input().strip()
count_ones = s.count('1')
if count_ones == 2:
print("Yes")
else:
def check_condition_a(s):
if '0' not in s:
return True
first_zero = s.index('0')
return all(c == '0' for c in s[first_zero:])
def check_condition_b(s):
if len(s) == 1:
return False
if s[0] == '1' and all(c == '0' for c in s[1:]):
return False
return True
if check_condition_a(s):
if check_condition_b(s):
print("Yes")
else:
print("No")
else:
print("No")
lam6er