結果
| 問題 | 
                            No.2007 Arbitrary Mod (Easy)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-07-15 22:04:43 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 405 bytes | 
| コンパイル時間 | 1,663 ms | 
| コンパイル使用メモリ | 165,392 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-27 18:04:16 | 
| 合計ジャッジ時間 | 5,442 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 3 | 
| other | WA * 30 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
long long a;
long long b;
long long mod = pow(10,8);
int main() {
    cin >> a, b;
    cout << mod << endl;
    cout << modpow(a, b, mod) << endl;
}