結果
| 問題 | No.3500 01 String |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-18 15:37:54 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 198 bytes |
| 記録 | |
| コンパイル時間 | 586 ms |
| コンパイル使用メモリ | 20,704 KB |
| 実行使用メモリ | 20,576 KB |
| 最終ジャッジ日時 | 2026-04-18 15:38:11 |
| 合計ジャッジ時間 | 6,211 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | WA * 1 RE * 19 |
ソースコード
from sys import stdin input = stdin.readline s = input().strip() l = len(s) right = max(i for i in range(l) if s[i] == "1") left = min(i for i in range(l) if s[i] == "0") print(right - left + 1)