結果
| 問題 |
No.858 わり算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-10 04:02:00 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 380 bytes |
| コンパイル時間 | 6,618 ms |
| コンパイル使用メモリ | 251,772 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-01-07 14:50:29 |
| 合計ジャッジ時間 | 7,218 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}