結果
問題 |
No.487 2017 Calculation(2017の計算)
|
ユーザー |
|
提出日時 | 2017-04-03 00:43:58 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 528 bytes |
コンパイル時間 | 570 ms |
コンパイル使用メモリ | 80,396 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-08 00:22:45 |
合計ジャッジ時間 | 1,094 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 4 |
ソースコード
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include<queue> #include <algorithm> #include<math.h> #include<set> #include<map> #include<iomanip> //#include<bits/stdc++.h> using namespace std; int main() { int x; cin >> x; int y = 2017 * 2017; //y %= x; int t = y; for (int i = 0; i < 2016; i++) { t *= y%x; t %= x; } t += 2017%x; t %= x; cout << t << endl; return 0; }