結果

問題 No.492 IOI数列
ユーザー olpheolphe
提出日時 2017-03-10 23:29:57
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 776 bytes
コンパイル時間 906 ms
コンパイル使用メモリ 107,548 KB
実行使用メモリ 7,684 KB
最終ジャッジ日時 2023-09-06 14:24:45
合計ジャッジ時間 3,668 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "random"

using namespace std;
const long long int MOD = 1000000007;

long long int box = 1;
long long int N;
long long int num;
char ans[11][50] = { "1","101","10101","1010101","101010101","10101010101","1010101010101","101010101010101","10101010101010101","1010101010101010101","0" };

int main() {
	cin >> N;
	num = N % (MOD / 2);
	if (!num)num += (MOD / 2);
	for (int i = 2; i <= num; i++) {
		box *= 100;
		box++;
		box %= MOD;
	}
	cout << box << endl;
	cout << ans[(N+10) % 11] << endl;
	return 0;
}
0