結果
| 問題 | No.346 チワワ数え上げ問題 |
| コンテスト | |
| ユーザー |
zombietan
|
| 提出日時 | 2016-05-16 09:50:24 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 37 ms / 2,000 ms |
| + 303µs | |
| コード長 | 150 bytes |
| 記録 | |
| コンパイル時間 | 58 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2026-09-10 22:55:09 |
| 合計ジャッジ時間 | 2,891 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
S = input()
wc = S.count('w')
ans = 0
for s in S:
if s == 'w':
wc -= 1
if s == 'c':
ans += ((wc-1)*wc)//2
print(ans)
zombietan