結果
| 問題 | No.346 チワワ数え上げ問題 |
| コンテスト | |
| ユーザー |
B9syDOfYhHFXecu
|
| 提出日時 | 2018-11-03 22:54:46 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 1,573 ms / 2,000 ms |
| コード長 | 176 bytes |
| 記録 | |
| コンパイル時間 | 349 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,356 KB |
| 最終ジャッジ日時 | 2026-05-14 23:08:59 |
| 合計ジャッジ時間 | 7,425 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
s = input()
count = 0
for index, word in enumerate(s):
if word == 'c':
count_w = s[index:].count('w')
count += count_w * (count_w - 1) // 2
print(count)
B9syDOfYhHFXecu