結果
問題 | No.746 7の倍数 |
ユーザー |
|
提出日時 | 2019-05-14 23:44:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 377 bytes |
コンパイル時間 | 1,709 ms |
コンパイル使用メモリ | 166,400 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 04:26:26 |
合計ジャッジ時間 | 2,584 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){int N;cin >> N;if (N == 0){cout << '0' << endl;return 0;}cout << "0.";string s = "142857";int repeat = N/6;for (int i = 0; i < repeat; ++i) cout << s;int residue = N % 6;for (int i = 0; i < residue; ++i) cout << s[i];cout << endl;return 0;}