結果
問題 | No.219 巨大数の概算 |
ユーザー |
|
提出日時 | 2015-12-16 02:27:57 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 27 ms / 1,500 ms |
コード長 | 532 bytes |
コンパイル時間 | 1,132 ms |
コンパイル使用メモリ | 159,660 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 11:48:25 |
合計ジャッジ時間 | 4,309 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 51 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> VI; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) #define in(T,V) T V;cin>>V; const int MOD = int(1e9+7); int main(){ in(int,N); REP(i,N){ in(ll,A); in(ll,B); double l = log10(A+0.) * B; ll Z = (ll)l; double d = pow(10, l-Z+1); while(d < 10.){ d *= 10; Z--; } ll X = (ll)d / 10; ll Y = (ll)d % 10; cout << X << " " << Y << " " << Z << endl; } }