結果
問題 |
No.746 7の倍数
|
ユーザー |
![]() |
提出日時 | 2018-10-19 21:40:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 541 bytes |
コンパイル時間 | 1,422 ms |
コンパイル使用メモリ | 166,352 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-18 20:17:10 |
合計ジャッジ時間 | 2,111 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | WA * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define repeat(i, x) for (int64_t i = 0; (i) < (int64_t)(x); (i)++) namespace TaskC { void solve() { int n; cin >> n; cout.precision(10); if (n <= 7) { int num = 1; repeat (i, n) num *= 10; cout << (double)(num / 7) / (double)num << endl; } else { cout << 1.0 / 7.0 << endl; } } } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); TaskC::solve(); return 0; }