結果
問題 | No.345 最小チワワ問題 |
ユーザー | Twizz |
提出日時 | 2017-02-22 20:29:56 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 285 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 10,776 KB |
実行使用メモリ | 8,028 KB |
最終ジャッジ日時 | 2023-08-29 01:30:41 |
合計ジャッジ時間 | 2,512 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
7,972 KB |
testcase_01 | AC | 16 ms
7,828 KB |
testcase_02 | AC | 16 ms
7,952 KB |
testcase_03 | AC | 15 ms
7,892 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | AC | 16 ms
7,880 KB |
testcase_11 | RE | - |
testcase_12 | WA | - |
testcase_13 | RE | - |
testcase_14 | WA | - |
testcase_15 | AC | 15 ms
7,960 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 14 ms
7,880 KB |
testcase_21 | WA | - |
testcase_22 | AC | 13 ms
7,812 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | RE | - |
ソースコード
l=input() n=l.count("c") s=0 m=[] for i in range(n): if i==0: s=l.find("c") i=l.find("w",s) e=l.find("w",i+1) m.append(e-s+1) else: s=l.find("c",s+1) i=l.find("w",s) e=l.find("w",i+1) m.append(e-s+1) print(max(m))