結果
問題 |
No.858 わり算
|
ユーザー |
|
提出日時 | 2019-08-10 03:58:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 498 bytes |
コンパイル時間 | 2,165 ms |
コンパイル使用メモリ | 196,176 KB |
最終ジャッジ日時 | 2025-01-07 11:37:41 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 3 WA * 5 |
ソースコード
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(0); int64_t a, b; cin >> a >> b; vector<int> ans; int64_t x = a, y = b; for (int i = 0; i < 100; i++) { int64_t z = x / y; ans.push_back(z); x -= z * y; x *= 10; } int d = 0; while (a) { a /= 10; d++; } for (int i = 0; i < d + 50; i++) { if (i == d) cout << '.'; cout << ans[i]; } cout << endl; return 0; }