結果
問題 | No.639 An Ordinary Sequence |
ユーザー | coro65536 |
提出日時 | 2018-01-26 23:57:50 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 874 ms |
コンパイル使用メモリ | 10,860 KB |
実行使用メモリ | 48,460 KB |
最終ジャッジ日時 | 2023-08-27 20:23:53 |
合計ジャッジ時間 | 4,657 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | AC | 154 ms
30,476 KB |
testcase_03 | AC | 154 ms
30,632 KB |
testcase_04 | AC | 156 ms
30,524 KB |
testcase_05 | AC | 155 ms
30,532 KB |
testcase_06 | AC | 156 ms
30,404 KB |
testcase_07 | AC | 156 ms
30,436 KB |
testcase_08 | AC | 156 ms
30,536 KB |
testcase_09 | AC | 156 ms
30,580 KB |
testcase_10 | AC | 160 ms
30,472 KB |
testcase_11 | AC | 158 ms
30,700 KB |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | AC | 155 ms
30,508 KB |
testcase_18 | RE | - |
ソースコード
# 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)