結果
問題 | No.346 チワワ数え上げ問題 |
ユーザー | akitsugu777 |
提出日時 | 2019-07-30 17:28:56 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 214 bytes |
コンパイル時間 | 240 ms |
コンパイル使用メモリ | 10,504 KB |
実行使用メモリ | 14,880 KB |
最終ジャッジ日時 | 2023-09-18 11:17:27 |
合計ジャッジ時間 | 16,929 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
12,372 KB |
testcase_01 | AC | 16 ms
7,892 KB |
testcase_02 | AC | 16 ms
7,832 KB |
testcase_03 | AC | 16 ms
7,840 KB |
testcase_04 | AC | 16 ms
7,876 KB |
testcase_05 | AC | 16 ms
7,828 KB |
testcase_06 | AC | 17 ms
7,856 KB |
testcase_07 | AC | 16 ms
7,888 KB |
testcase_08 | AC | 16 ms
7,800 KB |
testcase_09 | AC | 17 ms
7,856 KB |
testcase_10 | AC | 1,745 ms
8,196 KB |
testcase_11 | AC | 449 ms
8,160 KB |
testcase_12 | AC | 910 ms
8,344 KB |
testcase_13 | AC | 304 ms
8,096 KB |
testcase_14 | AC | 17 ms
7,788 KB |
testcase_15 | AC | 775 ms
8,212 KB |
testcase_16 | AC | 1,121 ms
8,348 KB |
testcase_17 | AC | 1,799 ms
8,332 KB |
testcase_18 | AC | 1,712 ms
8,268 KB |
testcase_19 | AC | 1,219 ms
8,172 KB |
testcase_20 | TLE | - |
testcase_21 | TLE | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
ソースコード
import math s = input() c = 0 for i in range(len(s)): if s[i] == 'c': w = s[i:].count('w') if w > 1: c += math.factorial(w) // (math.factorial(w - 2) * math.factorial(2)) print(c)