結果
| 問題 | No.589 Counting Even |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-03 23:31:04 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 319 bytes |
| 記録 | |
| コンパイル時間 | 413 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 31,960 KB |
| 最終ジャッジ日時 | 2026-05-17 08:11:21 |
| 合計ジャッジ時間 | 4,980 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 1 -- * 23 |
ソースコード
import operator as op
from functools import reduce
def ncr(n, r):
r = min(r, n-r)
if r == 0: return 1
numer = reduce(op.mul, range(n, n-r, -1))
denom = reduce(op.mul, range(1, r+1))
return numer//denom
n = int(input())
print(len(list(filter (lambda n:n%2 ==0, [ncr(n,i) for i in range(1,n)]))) )