結果

問題 No.746 7の倍数
ユーザー ElnathGeekElnathGeek
提出日時 2018-10-28 15:57:18
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 6 ms / 2,000 ms
コード長 1,297 bytes
コンパイル時間 2,675 ms
コンパイル使用メモリ 107,160 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-12 08:02:32
合計ジャッジ時間 2,293 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 6 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,384 KB
testcase_06 AC 3 ms
4,384 KB
testcase_07 AC 3 ms
4,384 KB
testcase_08 AC 3 ms
4,380 KB
testcase_09 AC 3 ms
4,380 KB
testcase_10 AC 2 ms
4,384 KB
testcase_11 AC 5 ms
4,384 KB
testcase_12 AC 6 ms
4,380 KB
testcase_13 AC 4 ms
4,384 KB
testcase_14 AC 5 ms
4,384 KB
testcase_15 AC 5 ms
4,384 KB
testcase_16 AC 4 ms
4,384 KB
testcase_17 AC 4 ms
4,380 KB
testcase_18 AC 5 ms
4,384 KB
testcase_19 AC 4 ms
4,380 KB
testcase_20 AC 3 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 5 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <string>
#include <vector>
#include <utility>
#include <complex>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <tuple>
#include <bitset>
#include <limits>
#include <algorithm>
#include <array>
#include <random>
#include <complex>
#include <regex>
using namespace std;
typedef long double ld;
typedef long long ll;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define fcout cout << fixed << setprecision(10)
#define rep(i,n)    for(int i=0; i<(int)n; i++)
#define mp(a,b) make_pair(a,b)
#define pb push_back
const ll inf = 1e18;
const ll mod = 1e9 + 7;

ll pow (ll x, ll n){
    ll ans = 1;
    while(n>0){
        if(n & 1 == 1){
            ans *= x;
        }
        x = x * x;
        n >>= 1;
    }
    return ans;
}


int main(){
    int n;  cin >> n;
    int c[6] = {1,4,2,8,5,7};
    if(n==0){
        cout << 0;
        return 0;
    }
    cout << "0." ;
    rep(i,n-1){
        cout << c[i%6];  
    }
    cout << c[ (n-1)%6 ] << endl;
    return 0;
}
0