結果
| 問題 | No.746 7の倍数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-05-14 23:44:39 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 492µs | |
| コード長 | 377 bytes |
| 記録 | |
| コンパイル時間 | 925 ms |
| コンパイル使用メモリ | 179,952 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-19 12:01:33 |
| 合計ジャッジ時間 | 2,855 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}