結果
| 問題 | No.345 最小チワワ問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-09 08:26:33 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 269 bytes |
| 記録 | |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-11-21 20:42:23 |
| 合計ジャッジ時間 | 1,963 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 WA * 8 |
ソースコード
s = []
N_flg = 1
m = 0
for i, n in enumerate(input()):
if n == "c":
m = i
N_flg = 2
elif n == "w" and N_flg == 2:
N_flg = 3
elif n == "w" and N_flg == 3:
s += [i - m + 1]
N_flg = 1
print(min(s) if len(s) != 0 else -1)