結果
| 問題 |
No.219 巨大数の概算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-30 00:18:24 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 1,500 ms |
| コード長 | 465 bytes |
| コンパイル時間 | 550 ms |
| コンパイル使用メモリ | 65,148 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 10:53:10 |
| 合計ジャッジ時間 | 4,039 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 51 |
ソースコード
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <cmath>
using namespace std;
int main() {
long long a, b;
int n;
int x, y;
long long z;
cin >> n;
long double loglog, tmp;
for (int i = 0; i < n; i++) {
cin >> a >> b;
loglog = 1.0 * b * log10l(a);
z = loglog;
tmp = pow(10, loglog - z);
x = tmp;
y = (tmp - x) * 10;
printf("%d %d %lld\n", x, y, z);
}
return 0;
}