結果

問題 No.346 チワワ数え上げ問題
ユーザー dangodango
提出日時 2023-06-15 21:05:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 122 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 76,464 KB
最終ジャッジ日時 2023-09-05 23:53:40
合計ジャッジ時間 3,757 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,372 KB
testcase_01 AC 77 ms
71,380 KB
testcase_02 AC 78 ms
71,484 KB
testcase_03 AC 76 ms
71,304 KB
testcase_04 AC 78 ms
71,300 KB
testcase_05 AC 76 ms
71,368 KB
testcase_06 AC 77 ms
71,412 KB
testcase_07 AC 75 ms
71,584 KB
testcase_08 AC 77 ms
71,568 KB
testcase_09 AC 76 ms
71,224 KB
testcase_10 AC 81 ms
76,088 KB
testcase_11 AC 81 ms
75,956 KB
testcase_12 AC 82 ms
76,036 KB
testcase_13 AC 83 ms
76,096 KB
testcase_14 AC 83 ms
75,648 KB
testcase_15 AC 83 ms
76,056 KB
testcase_16 AC 82 ms
76,408 KB
testcase_17 AC 82 ms
76,388 KB
testcase_18 AC 87 ms
76,464 KB
testcase_19 AC 87 ms
76,304 KB
testcase_20 AC 80 ms
75,872 KB
testcase_21 AC 83 ms
76,160 KB
testcase_22 AC 82 ms
76,296 KB
testcase_23 AC 76 ms
71,388 KB
testcase_24 AC 75 ms
71,416 KB
testcase_25 AC 74 ms
71,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
W = S.count("w")
T = 0
for C in S:
	if C == "c":
		T += W * (W - 1) / 2
	elif C == "w":
		W -= 1
print(int(T))
0