結果
問題 |
No.858 わり算
|
ユーザー |
![]() |
提出日時 | 2020-01-24 12:36:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 346 bytes |
コンパイル時間 | 1,560 ms |
コンパイル使用メモリ | 170,076 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-14 01:31:10 |
合計ジャッジ時間 | 2,214 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int A, B; scanf("%d %d", &A, &B); string ans; if (B < A) { ans = to_string(A / B) + "."; A %= B; } else { ans = "0."; } A *= 10; for (int i = 0; i < 50; ++i) { ans += to_string(A / B); A %= B; A *= 10; } cout << ans << endl; return 0; }