結果
問題 |
No.345 最小チワワ問題
|
ユーザー |
|
提出日時 | 2018-06-28 19:07:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 251 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-06-30 23:31:46 |
合計ジャッジ時間 | 2,043 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 14 RE * 6 |
ソースコード
# coding: utf-8 S = list(input()) start_index = S.index("c") if start_index == -1: print(-1) else: del S[:start_index] indexes = [i for i, x in enumerate(S) if x == 'w'] if len(indexes) < 2: print(-1) else: print(indexes[1] + 1 )