結果
| 問題 | No.487 2017 Calculation(2017の計算) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-03 00:44:42 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 538 bytes |
| 記録 | |
| コンパイル時間 | 434 ms |
| コンパイル使用メモリ | 102,936 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-03-29 15:57:34 |
| 合計ジャッジ時間 | 977 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}