結果
| 問題 |
No.746 7の倍数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-29 20:36:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 484 bytes |
| コンパイル時間 | 748 ms |
| コンパイル使用メモリ | 92,416 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-03 04:36:34 |
| 合計ジャッジ時間 | 1,787 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<vector>
#include<map>
#include<queue>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
int main() {
int n,m;
cin >> n;
string s="142857";
if(n==0) {
cout << 0;
}
else {
cout << "0.";
m=n;
m/=6;
for(int i=0; i<m; i++) {
cout << s;
}
n%=6;
for(int i=1; i<=n; i++) {
cout << s[i-1];
}
}
cout << endl;
}