結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
PicklesSuperior
|
| 提出日時 | 2018-08-10 00:14:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 517 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-09-23 05:18:56 |
| 合計ジャッジ時間 | 2,092 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 11 |
ソースコード
sentence = input()
N = len(sentence)
second = False
min = 101
for i in range(N):
if sentence[i] == "c":
count = 1
for j in range(N-i-1):
count = count+1
if sentence[i+j+1] == "w":
if second == True:
if min > count:
min = count
second = False
break
else:
second = True
if min == 101:
min = -1
print(min)
PicklesSuperior