結果
| 問題 | No.345 最小チワワ問題 |
| コンテスト | |
| ユーザー |
JunOnuma
|
| 提出日時 | 2017-06-06 11:38:05 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 328 bytes |
| 記録 | |
| コンパイル時間 | 139 ms |
| コンパイル使用メモリ | 77,748 KB |
| 最終ジャッジ日時 | 2025-12-03 23:57:30 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 14 |
ソースコード
s = raw_input()
find = False
for i in range(len(s)):
if s[i] == 'c':
w = 0
for j in range(i+1,len(s)):
if s[j] == 'w':
w += 1
if w == 2:
print j-i+1
find = True
break
if find:
break
if not find:
print -1
JunOnuma