結果

問題 No.793 うし数列 2
コンテスト
ユーザー mikianaaa
提出日時 2020-09-15 16:26:19
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 554 bytes
コンパイル時間 1,813 ms
コンパイル使用メモリ 165,748 KB
実行使用メモリ 13,760 KB
最終ジャッジ日時 2024-06-22 01:50:27
合計ジャッジ時間 4,943 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 WA * 3 TLE * 1 -- * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define ll long long
#define INF 1000000000000000000
typedef pair<ll, ll> pll;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N;
    cin >> N;
    ll exp = 1;
    ll MOD = pow(10, 9) + 7;
    ll ans = 0;
    rep(i, N) {
        ans += exp * 3;
        ans %= MOD;
        exp *= 10;
        exp %= MOD;
    }

    ans += exp * 1;
    ans %= MOD;
    cout << ans << endl;
}
0