結果

問題 No.858 わり算
ユーザー ilplrr
提出日時 2019-08-09 21:55:56
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 63,360 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 11:48:05
合計ジャッジ時間 963 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    
    for (int i = 0; i <= 50; i++) {
        int t = a / b;
        cout << t;
        if (!i) cout << ".";
        
        a = (t < b ? t * 10 : t);
    }
    cout << endl;
}
0