結果
問題 | No.639 An Ordinary Sequence |
ユーザー | coro65536 |
提出日時 | 2018-01-26 23:57:50 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 43,840 KB |
最終ジャッジ日時 | 2024-12-28 03:09:01 |
合計ジャッジ時間 | 12,922 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 RE * 1 |
other | AC * 10 RE * 7 |
ソースコード
# C import math import scipy.misc as scm N = int(input()) if N == 0: print(1) quit() if N == 1 or N == 2: print(2) quit() arr = [[0 for j in range(int(math.log(N, 5))+1)] for i in range(int(math.log(N, 3))+1)] # 1 indexed ans = 2 + int(math.log(N, 5)) + int(math.log(N, 3)) for i in range(1, int(math.log(N, 3))+1): for j in range(1, int(math.log(N, 5))+1): if 3**i * 5**j <= N: ans += scm.comb(i+j, i, 1) print(ans)