結果
| 問題 |
No.487 2017 Calculation(2017の計算)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-01 14:31:45 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 222 bytes |
| コンパイル時間 | 475 ms |
| コンパイル使用メモリ | 20,608 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-25 00:53:19 |
| 合計ジャッジ時間 | 1,239 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%llu",&m);
| ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
unsigned long long int x,t,m,i;
scanf("%llu",&m);
t = (2017*2017) % m;
x = t;
for(i = 2;i <= 2017;i++){
x = (x * t) % m;
}
x = (x + 2017) % m;
printf("%llu\n",x);
return 0;
}