結果
| 問題 | No.345 最小チワワ問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-12-03 11:14:24 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 314 bytes |
| 記録 | |
| コンパイル時間 | 53 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 14,720 KB |
| 最終ジャッジ日時 | 2026-12-03 11:14:29 |
| 合計ジャッジ時間 | 3,543 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 RE * 1 |
| other | AC * 23 RE * 8 |
ソースコード
S = input()
cPos, wPos, w2Pos, minStep, temp = 0, 0, 0, [], -1
for _ in range(S.count("c")):
cPos = S.find("c", temp+1)
wPos = S.find("w", cPos+1)
w2Pos = S.find("w", wPos+1)
temp = cPos
if not (cPos==-1 or wPos==-1 or w2Pos==-1):
minStep.append(w2Pos - cPos + 1)
print(min(minStep))