結果
| 問題 |
No.16 累乗の加算
|
| コンテスト | |
| ユーザー |
takatowin
|
| 提出日時 | 2017-01-09 02:25:11 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 207 bytes |
| コンパイル時間 | 610 ms |
| コンパイル使用メモリ | 22,912 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-17 23:58:43 |
| 合計ジャッジ時間 | 1,570 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 12 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d %d",&x,&n);
| ^~~~~~~~~~~~~~~~~~~~
main.c:8:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d",&a);
| ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<math.h>
double temp=0;
int main(void){
int i,x,n,a;
scanf("%d %d",&x,&n);
for(i=0;i<n;i++){
scanf("%d",&a);
temp+=pow(x,a);
}
printf("%.lf\n",fmod(temp,1000003));
return 0;
}
takatowin