結果

問題 No.346 チワワ数え上げ問題
ユーザー convexineqconvexineq
提出日時 2021-02-01 18:01:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 125 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 75,984 KB
最終ジャッジ日時 2023-09-12 10:14:36
合計ジャッジ時間 3,722 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,660 KB
testcase_01 AC 71 ms
71,400 KB
testcase_02 AC 70 ms
71,328 KB
testcase_03 AC 70 ms
71,268 KB
testcase_04 AC 74 ms
71,408 KB
testcase_05 AC 70 ms
71,300 KB
testcase_06 AC 72 ms
71,632 KB
testcase_07 AC 71 ms
71,460 KB
testcase_08 AC 71 ms
71,300 KB
testcase_09 AC 71 ms
71,256 KB
testcase_10 AC 77 ms
75,748 KB
testcase_11 AC 75 ms
75,760 KB
testcase_12 AC 77 ms
75,656 KB
testcase_13 AC 75 ms
75,672 KB
testcase_14 AC 72 ms
75,640 KB
testcase_15 AC 76 ms
75,664 KB
testcase_16 AC 77 ms
75,984 KB
testcase_17 AC 77 ms
75,672 KB
testcase_18 AC 79 ms
75,824 KB
testcase_19 AC 77 ms
75,848 KB
testcase_20 AC 74 ms
75,608 KB
testcase_21 AC 77 ms
75,724 KB
testcase_22 AC 75 ms
75,900 KB
testcase_23 AC 70 ms
71,248 KB
testcase_24 AC 70 ms
71,348 KB
testcase_25 AC 71 ms
71,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
a = 1
b = c = d = 0
for i in s:
    if i == "c":
        b += a
    elif i == "w":
        c,d = c+b,d+c
print(d)
0