結果
問題 | No.219 巨大数の概算 |
ユーザー |
|
提出日時 | 2015-05-30 00:11:53 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 30 ms / 1,500 ms |
コード長 | 389 bytes |
コンパイル時間 | 1,299 ms |
コンパイル使用メモリ | 160,020 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-18 10:51:47 |
合計ジャッジ時間 | 4,631 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 51 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){int N;cin >> N;for(int i=0;i<N;i++){int A, B;cin >> A >> B;long double l = log10(A) * B;ll Z = l;int t = pow(10, l - Z + 1);int X = t / 10;int Y = t % 10;cout << X << " " << Y << " " << Z << endl;}return 0;}