結果

問題 No.858 わり算
ユーザー @abcde
提出日時 2019-08-23 19:36:34
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 1,527 ms
コンパイル使用メモリ 160,672 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-01-07 14:51:24
合計ジャッジ時間 2,160 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |     scanf("%lld %lld", &A, &B);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

// ※※※ 解答不能. ※※※
// 以下のソースコード参照.
// nmnmnmnmnmnmnm氏.
// https://yukicoder.me/submissions/293765
#include <bits/stdc++.h>
using namespace std;
using LL = long long;

int main(){
    LL A, B;
    scanf("%lld %lld", &A, &B);
    printf("%lld", A / B);
    printf("%c", '.');
    A %= B;
    for(int i = 0; i < 50; i++){
        A *= 10;
        printf("%lld", A / B);
        A %= B;
    }
    return 0;
}
0