結果
| 問題 | No.2063 ±2^k operations (easy) |
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2022-09-06 14:04:43 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 50 ms / 2,000 ms |
| コード長 | 341 bytes |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 12,672 KB |
| 最終ジャッジ日時 | 2024-11-21 15:18:30 |
| 合計ジャッジ時間 | 1,707 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
import sys
readline=sys.stdin.readline
write=sys.stdout.write
N=readline().rstrip()
cnt=N.count("1")
if cnt==1:
ans="No"
elif cnt==2:
ans="Yes"
else:
le=len(N)
lst=[]
for i in range(le):
if N[i]=="1":
lst.append(i)
if lst[-1]-lst[0]+1==cnt:
ans="Yes"
else:
ans="No"
print(ans)
vwxyz