結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-24 21:56:01 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 502 bytes |
| コンパイル時間 | 608 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-09-13 05:25:54 |
| 合計ジャッジ時間 | 2,374 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 29 |
ソースコード
S = "ilovechiwawa"
def chk_chiwawa(input):
count_len = 0
count_cww = 0
cww_num = -1
for i in input:
if count_cww == 3:
cww_num = count_len
break
if count_cww >= 1:
if i == "w":
count_cww += 1
count_len += 1
continue
if i == "c":
count_cww += 1
count_len += 1
return cww_num
if __name__ == '__main__':
output = chk_chiwawa(S)
print(output, '\n')