結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-11 00:28:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 243 bytes |
| コンパイル時間 | 92 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-09-29 21:47:42 |
| 合計ジャッジ時間 | 1,762 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 16 |
ソースコード
S = input()
first_c = S.find("c")
first_w = S.find("w")
second_w = (S[(first_w + 1):].find("w")) + first_w + 1
if (first_c >= 0) and (first_w >= 0) and (second_w >= 0) and (first_c < first_w):
print(second_w - first_c + 1)
else:
print(-1)