結果
| 問題 | No.858 わり算 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-10 04:02:00 |
| 言語 | C++17(gcc12) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 380 bytes |
| 記録 | |
| コンパイル時間 | 1,350 ms |
| コンパイル使用メモリ | 200,120 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-07 19:22:54 |
| 合計ジャッジ時間 | 2,119 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
ソースコード
#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, x, y, z;
cin >> a >> b;
x = a;
y = b;
z = x / y;
cout << z << '.';
x -= z * y;
x *= 10;
for (int i = 0; i < 50; i++) {
z = x / y;
cout << z;
x -= y * z;
x *= 10;
}
cout << endl;
return 0;
}