結果
| 問題 | No.346 チワワ数え上げ問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-30 17:32:33 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 247 bytes |
| 記録 | |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 18,356 KB |
| 最終ジャッジ日時 | 2024-07-05 02:33:20 |
| 合計ジャッジ時間 | 14,504 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 21 TLE * 1 -- * 1 |
ソースコード
import math
s = input()
c = 0
for i in range(len(s)):
if s[i] == 'c':
if 'w' in s:
w = s[i:].count('w')
if w > 1:
c += math.factorial(w) // (math.factorial(w - 2) * math.factorial(2))
print(c)