結果
問題 |
No.487 2017 Calculation(2017の計算)
|
ユーザー |
|
提出日時 | 2017-04-03 00:44:42 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 538 bytes |
コンパイル時間 | 647 ms |
コンパイル使用メモリ | 81,372 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-08 00:22:46 |
合計ジャッジ時間 | 1,076 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
#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; long long 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; }