結果
| 問題 | No.793 うし数列 2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-21 23:25:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 562 bytes |
| 記録 | |
| コンパイル時間 | 2,779 ms |
| コンパイル使用メモリ | 194,320 KB |
| 最終ジャッジ日時 | 2025-01-12 01:49:35 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 3 WA * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,b,e) for (int i=(int)(b); i<(int)(e); i++)
#define ALL(x) (x).begin(), (x).end()
const double PI = acos(-1);
const long long MOD = 1e9 + 7;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
long long n;
cin >> n;
long long x = 1;
vector<int> r;
for (int i = 0; i < 1000; i++) {
r.push_back(x % MOD);
x = 10 * x + 3;
}
if (n > r.size())
cout << r.back() << endl;
else
cout << r[n] << endl;
return 0;
}