結果
| 問題 |
No.346 チワワ数え上げ問題
|
| コンテスト | |
| ユーザー |
ebicochineal
|
| 提出日時 | 2016-03-12 22:37:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 2,000 ms |
| コード長 | 157 bytes |
| コンパイル時間 | 179 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-09-25 11:12:32 |
| 合計ジャッジ時間 | 2,075 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
s = input()
c = 0
sum = 0
for i in range(len(s)-1, -1, -1):
if s[i]=='w':
c += 1
if s[i]=='c':
if c>1: sum += c*(c-1)
print(sum // 2)
ebicochineal