結果
| 問題 | 
                            No.487 2017 Calculation(2017の計算)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             makonagix
                         | 
                    
| 提出日時 | 2017-03-10 22:14:31 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 269 bytes | 
| コンパイル時間 | 373 ms | 
| コンパイル使用メモリ | 55,156 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-24 07:56:58 | 
| 合計ジャッジ時間 | 1,051 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 WA * 13 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:15: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |         system("pause");
      |         ~~~~~~^~~~~~~~~
            
            ソースコード
#include <iostream>
using namespace std;
int main() {
	int m;
	cin >> m;
	int a = 2017 % m;
	int b = (2017 * 2017) % m;
	int c = 1;
	for (int i = 0; i < 2017; i++) {
		c = (c*b) % 2017;
	}
	int ans = (a + c) % 2017;
	cout << ans << endl;
	system("pause");
	return 0;
}
            
            
            
        
            
makonagix