結果

問題 No.346 チワワ数え上げ問題
ユーザー NagisaNagisa
提出日時 2016-02-27 03:08:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 508 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 11,772 KB
実行使用メモリ 53,788 KB
最終ジャッジ日時 2023-10-24 18:11:12
合計ジャッジ時間 7,200 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 807 ms
53,788 KB
testcase_01 AC 36 ms
9,984 KB
testcase_02 AC 28 ms
9,940 KB
testcase_03 AC 28 ms
9,940 KB
testcase_04 AC 157 ms
10,192 KB
testcase_05 AC 27 ms
9,940 KB
testcase_06 AC 394 ms
10,392 KB
testcase_07 AC 34 ms
9,980 KB
testcase_08 AC 44 ms
10,008 KB
testcase_09 AC 1,003 ms
10,692 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
c = []
w1 = []
w2 = []

for k in range(len(S)):
    if S[k] == "c":
        c.append(k)

for l in c:
    for m in range(l+1,len(S)):
        if S[m] == "w":
            w1.append(m)

for l in w1:
    for m in range(l+1,len(S)):
        if S[m] == "w":
            w2.append(m)

c = set(c)
w1 = set(w1)
w2 = set(w2)

ans = []
for p in c:
    for q in w1:
        for r in w2:
            if p < q < r:
                if [p,q,r] not in ans:
                    ans.append([p,q,r])

print(len(ans))
0