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