結果
| 問題 | No.793 うし数列 2 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-08-21 23:01:09 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 322 bytes | 
| コンパイル時間 | 2,019 ms | 
| コンパイル使用メモリ | 193,200 KB | 
| 最終ジャッジ日時 | 2025-01-07 14:36:14 | 
| ジャッジサーバーID (参考情報) | judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 1 | 
| other | AC * 6 WA * 15 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int mpow(ll a,ll b,int m) {
    int ans=1;
    while (b) {
        if (b&1) ans=ans*a%m;
        a=a*a%m;
        b>>=1;
    }
    return ans;
}
int main() {
    int m=1e9+7;
    ll n;
    cin>>n;
    cout<<(4LL*mpow(10,n,m)-1)/3<<endl;
    return 0;
}
            
            
            
        