結果

問題 No.639 An Ordinary Sequence
ユーザー square1001square1001
提出日時 2017-07-10 12:59:33
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 194 bytes
コンパイル時間 679 ms
コンパイル使用メモリ 63,884 KB
実行使用メモリ 42,444 KB
最終ジャッジ日時 2023-08-03 16:06:20
合計ジャッジ時間 4,403 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 1 ms
4,384 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,384 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,384 KB
testcase_08 AC 2 ms
4,384 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,384 KB
testcase_11 AC 2 ms
4,384 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 2 ms
4,380 KB
testcase_18 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int n, dp[10000009];
int main() {
	cin >> n; dp[0] = 1;
	for (int i = 1; i <= n; i++) dp[i] = dp[i / 3] + dp[i / 5];
	cout << dp[n] << endl;
	return 0;
}
0