結果

問題 No.858 わり算
ユーザー ttttan2ttttan2
提出日時 2019-08-09 22:04:59
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 471 bytes
コンパイル時間 10,654 ms
コンパイル使用メモリ 372,048 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-26 18:07:31
合計ジャッジ時間 6,656 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 AC 2 ms
4,376 KB
testcase_03 WA -
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#include<boost/multiprecision/cpp_dec_float.hpp>
namespace mp=boost::multiprecision;
int main(){
    mp::cpp_dec_float_100 a,b,c;std::cin>>a>>b;
    c=a/b;
    //std::cout<<std::setprecision(51)<<c<<std::endl;
    std::string s=c.str();
  int cnt=-1;
    for(int i=0;i<s.size();i++){
      std::cout<<s[i];
      if(cnt>=0)cnt++;
      if(s[i]=='.')cnt++;
      
      if(cnt==50){
        std::cout<<std::endl;
        return 0;
      }
    }
}

0