結果
| 問題 |
No.346 チワワ数え上げ問題
|
| コンテスト | |
| ユーザー |
ebicochineal
|
| 提出日時 | 2016-03-12 22:33:18 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 200 bytes |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 17,820 KB |
| 最終ジャッジ日時 | 2024-09-25 11:12:22 |
| 合計ジャッジ時間 | 12,790 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 21 TLE * 1 -- * 1 |
ソースコード
import math
f = math.factorial
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 += (f(c) // f(c-2)) // f(2)
print(sum)
ebicochineal