結果
問題 |
No.746 7の倍数
|
ユーザー |
![]() |
提出日時 | 2019-08-17 04:13:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 565 bytes |
コンパイル時間 | 1,153 ms |
コンパイル使用メモリ | 94,492 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 18:37:43 |
合計ジャッジ時間 | 1,985 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <cstring> #include <math.h> #include <cmath> #include <limits.h> #include <map> #include <unordered_map> #include <set> #include <queue> #include <algorithm> #include <functional> #include <stdio.h> using namespace std; long long MOD = 1000000007; int main() { int N; cin >> N; string S = "142857"; if ( N == 0 ) { cout << 0 << endl; return 0; } string ans = "0."; for ( int i = 0; i < N; i++ ) { ans += S[i%6]; } cout << ans << endl; return 0; }