結果
| 問題 | No.219 巨大数の概算 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-29 23:22:58 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 1,500 ms |
| コード長 | 459 bytes |
| 記録 | |
| コンパイル時間 | 420 ms |
| コンパイル使用メモリ | 85,872 KB |
| 実行使用メモリ | 92,272 KB |
| 最終ジャッジ日時 | 2026-04-02 03:05:01 |
| 合計ジャッジ時間 | 3,142 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
double loglog, tmp;
for (int i = 0; i < n; i++) {
cin >> a >> b;
loglog = 1.0 * b * log10(a);
z = loglog;
tmp = pow(10, loglog - z);
x = tmp;
y = (tmp - x) * 10;
printf("%d %d %lld\n", x, y, z);
}
return 0;
}