結果

問題 No.744 循環小数N桁目 Easy
ユーザー gon_027gon_027
提出日時 2018-12-01 12:12:23
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 516 bytes
コンパイル時間 451 ms
コンパイル使用メモリ 65,780 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-09 06:48:35
合計ジャッジ時間 1,931 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 RE -
testcase_03 WA -
testcase_04 RE -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
#define _USE_MATH_DEFINENS
#include <cmath>
using namespace std;

#define p(x) cout << x << endl;
#define el cout << endl;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    long n;
    cin >> n;

    int ddd[] = {7, 8, 5, 7, 1, 4};

    while(n <= 6){
        if (n <= 6) break;
        n -= 6;
    }

    cout << ddd[n - 1] << endl;
}
0