結果
問題 |
No.345 最小チワワ問題
|
ユーザー |
|
提出日時 | 2022-04-04 14:32:31 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 195 bytes |
コンパイル時間 | 282 ms |
コンパイル使用メモリ | 82,276 KB |
実行使用メモリ | 54,224 KB |
最終ジャッジ日時 | 2024-11-25 05:53:42 |
合計ジャッジ時間 | 2,346 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 14 |
ソースコード
S = input() c_idx = S.find("c") w_1_idx = S.find("w", c_idx) w_2_idx = S.find("w", w_1_idx+1) if c_idx != -1 and w_1_idx != -1 and w_2_idx != -1: print(w_2_idx-c_idx+1) else : print(-1)