結果

問題 No.858 わり算
ユーザー ttttan2
提出日時 2019-08-09 22:04:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 471 bytes
コンパイル時間 8,928 ms
コンパイル使用メモリ 360,896 KB
最終ジャッジ日時 2025-01-07 11:21:18
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 4 WA * 4
権限があれば一括ダウンロードができます

ソースコード

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