結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
JunOnuma
|
| 提出日時 | 2017-06-06 11:38:05 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 328 bytes |
| コンパイル時間 | 756 ms |
| コンパイル使用メモリ | 7,072 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 11:42:04 |
| 合計ジャッジ時間 | 2,106 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / 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