結果
| 問題 |
No.16 累乗の加算
|
| コンテスト | |
| ユーザー |
youjo_yamioti
|
| 提出日時 | 2018-12-02 11:12:22 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 359 bytes |
| コンパイル時間 | 1,447 ms |
| コンパイル使用メモリ | 159,076 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 13:44:53 |
| 合計ジャッジ時間 | 1,950 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
long long int sum = 0;
long long int ans;
int x,N;
cin >> x >> N;
vector<int> a(N,0);
for(int i=0;i<N;i++) cin >> a[i];
for(int i=0;i<N;i++){
a[i] = a[i] % 1000002;
sum += (long long int)pow(x,a[i]);
}
ans = sum % 1000003;
cout << ans << endl;
}
youjo_yamioti