結果
問題 |
No.589 Counting Even
|
ユーザー |
|
提出日時 | 2017-11-03 23:31:04 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 80 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 34,112 KB |
最終ジャッジ日時 | 2024-11-23 14:56:53 |
合計ジャッジ時間 | 67,371 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 TLE * 22 |
ソースコード
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)]))) )