結果

問題 No.744 循環小数N桁目 Easy
ユーザー d_sei
提出日時 2019-08-18 11:43:54
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 625 ms
コンパイル使用メモリ 73,920 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-01 13:51:55
合計ジャッジ時間 1,186 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include <vector>
#include<cmath>
using namespace std;
int main() {
	const string A = "285714";
	int N;
	cin >> N;
	if (N % 6 != 0) {
		cout << A.at(N % 6 - 1) << endl;
	}
	else if (N % 6 == 0) {
		cout << 4 << endl;
	}
}
0