結果

問題 No.747 循環小数N桁目 Hard
ユーザー oevl
提出日時 2018-10-19 22:43:23
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 890 ms
コンパイル使用メモリ 55,780 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-18 21:47:22
合計ジャッジ時間 4,151 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 4
other WA * 120
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:17:15: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   17 |         system("pause");
      |         ~~~~~~^~~~~~~~~

ソースコード

diff #

#include<iostream>
#include<string>
using namespace std;
using ll = long long int;
int main() {
	ll  N, K; cin >> N >> K;
	ll amari = N % 6;
	K %= 6;
	for (int i = 0; i < K; i++) {
		amari *= amari;
		amari %= 6;
	}
	amari %= 6;
	cout << amari << endl;
	string s = "285714";
	cout << s[(amari-1)%6] << endl;
	system("pause");
	return 0;
}
0