結果
| 問題 |
No.858 わり算
|
| コンテスト | |
| ユーザー |
CELICA
|
| 提出日時 | 2020-10-05 22:08:36 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 406 bytes |
| コンパイル時間 | 1,504 ms |
| コンパイル使用メモリ | 163,644 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-01-07 14:55:10 |
| 合計ジャッジ時間 | 2,213 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ul = unsigned long;
using ull = unsigned long long;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll a, b;
cin >> a >> b;
string s1 =to_string(a / b) + ".";
string s2(50, '0');
a %= b;
for (int i = 0; i < 50; ++i)
{
a *= 10;
s2[i] = a / b + '0';
a %= b;
}
cout << s1 + s2 << "\n";
return 0;
}
CELICA