結果
問題 | No.219 巨大数の概算 |
ユーザー |
|
提出日時 | 2015-05-29 21:48:02 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 28 ms / 1,500 ms |
コード長 | 399 bytes |
コンパイル時間 | 1,105 ms |
コンパイル使用メモリ | 159,472 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 10:31:53 |
合計ジャッジ時間 | 4,330 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 = logl(A) * B / logl(10);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;}