結果
問題 | No.219 巨大数の概算 |
ユーザー |
|
提出日時 | 2018-06-25 22:18:44 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 28 ms / 1,500 ms |
コード長 | 327 bytes |
コンパイル時間 | 571 ms |
コンパイル使用メモリ | 67,580 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 22:42:54 |
合計ジャッジ時間 | 4,106 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 51 |
ソースコード
#include <iostream> #include <math.h> using namespace std; typedef long long LL; int main(int argc, char* argv[]) { LL N,A,B; cin>>N; for (int i=0;i<N;i++){ cin>>A>>B; double x=B*log10((double)A); LL Z=(LL)x; double y=pow(10,x-Z); LL X=(LL)y; LL Y=(LL)((y-X)*10); cout<<X<<" "<<Y<<" "<<Z<<endl; } return 0; }