結果
| 問題 | No.219 巨大数の概算 |
| コンテスト | |
| ユーザー |
dgd1724
|
| 提出日時 | 2016-10-26 20:07:12 |
| 言語 | C++11(廃止可能性あり) (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 765 bytes |
| 記録 | |
| コンパイル時間 | 2,010 ms |
| コンパイル使用メモリ | 160,060 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-19 16:18:16 |
| 合計ジャッジ時間 | 11,923 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 51 |
ソースコード
#include <bits/stdc++.h>
//const static double de_PI = 3.14159265358979323846;
//const static int de_MOD = 1000000007;
//const static int de_MAX = 999999999;
//const static int de_MIN = -999999999;
int main(void) {
//std::ifstream in("123.txt"); std::cin.rdbuf(in.rdbuf());
int N = 0;
std::cin >> N;
std::vector<int> ans(3 * N);
int A = 0, B = 0;
double temp1 = 0;
int temp2 = 0;
for (int i = 0; i < N; i++) {
std::cin >> A >> B;
temp1 = B*log10(A);
ans[i * 3 + 2] = static_cast<int>(temp1);
temp2 = static_cast<int>(pow(10, temp1 - ans[i * 3 + 2] + 1));
ans[i * 3] = temp2 / 10;
ans[i * 3 + 1] = temp2 % 10;
}
for (int i = 0; i < N; i++) {
std::cout << ans[i * 3] << " " << ans[i * 3 + 1] << " " << ans[i * 3 + 2] << std::endl;
}
}
dgd1724