結果
問題 |
No.858 わり算
|
ユーザー |
|
提出日時 | 2020-04-20 10:37:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 448 bytes |
コンパイル時間 | 524 ms |
コンパイル使用メモリ | 66,004 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-07 14:53:58 |
合計ジャッジ時間 | 1,154 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
#include <algorithm> #include <iostream> #include <string> #include <vector> #include <numeric> using namespace std; using ull = unsigned long long; #define Mod %1000000007 int main() { ull A, B; cin >> A >> B; if (A >= B) { cout << (A - A % B) / B; A = (A % B) * 10; } else { cout << "0"; A *= 10; } cout << "."; for (int i = 0; i < 50; ++i) { cout << (A - A % B) / B; A = (A % B) * 10; } cout << endl; return 0; }