結果
問題 |
No.345 最小チワワ問題
|
ユーザー |
|
提出日時 | 2021-05-06 11:24:47 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 300 bytes |
コンパイル時間 | 229 ms |
コンパイル使用メモリ | 82,116 KB |
実行使用メモリ | 54,024 KB |
最終ジャッジ日時 | 2024-09-14 04:05:15 |
合計ジャッジ時間 | 2,424 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 22 |
ソースコード
S = input() start = end = 0 flg = 0 for i in range(len(S)): if flg == 0 and S[i] == "c": start = i flg += 1 elif flg == 1 and S[i] == "w": flg += 1 elif flg == 2 and S[i] == "w": end = i break if end - start: print(end-start+1)