結果

問題 No.744 循環小数N桁目 Easy
ユーザー gon_027
提出日時 2018-12-01 12:12:23
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 516 bytes
コンパイル時間 665 ms
コンパイル使用メモリ 65,216 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-26 23:57:57
合計ジャッジ時間 2,270 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1 RE * 1
other WA * 2 RE * 5
権限があれば一括ダウンロードができます

ソースコード

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