結果
| 問題 |
No.487 2017 Calculation(2017の計算)
|
| コンテスト | |
| ユーザー |
makonagix
|
| 提出日時 | 2017-03-10 22:10:34 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 266 bytes |
| コンパイル時間 | 433 ms |
| コンパイル使用メモリ | 55,884 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-24 07:56:32 |
| 合計ジャッジ時間 | 1,072 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 13 |
ソースコード
#include <iostream>
using namespace std;
int main() {
int m;
cin >> m;
int a = 2017 - (2017 / m)*m;
int b = 2017 * 2017 - (2017 * 2017 / m)*m;
for (int i = 0; i < 2017; i++) {
b = (b*b) % 2017;
}
int ans = (a + b) % 2017;
cout << ans << endl;
return 0;
}
makonagix