結果

問題 No.492 IOI数列
ユーザー olpheolphe
提出日時 2017-03-10 23:27:41
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 788 bytes
コンパイル時間 908 ms
コンパイル使用メモリ 106,952 KB
実行使用メモリ 7,860 KB
最終ジャッジ日時 2023-09-06 14:21:19
合計ジャッジ時間 3,491 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 TLE -
testcase_05 -- -
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 + 1) / 2);
	if (!num)num += ((MOD + 1) / 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