結果
問題 | No.858 わり算 |
ユーザー |
|
提出日時 | 2019-08-09 21:46:23 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 456 bytes |
コンパイル時間 | 1,773 ms |
コンパイル使用メモリ | 100,640 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-07 14:49:33 |
合計ジャッジ時間 | 2,319 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
#include <iostream> #include <vector> #include <set> #include <queue> #include <utility> using namespace std; typedef long long int ll; int main(){ cin.tie(0); ios::sync_with_stdio(false); ll A, B; cin >> A >> B; ll integer = A / B; vector<int> frac(50); A %= B; for (int i = 0; i < 50; i++) { A *= 10; frac[i] = A / B; A %= B; } cout << integer << "."; for (auto &x: frac) cout << x; cout << endl; return 0; }