結果
| 問題 |
No.219 巨大数の概算
|
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2015-10-09 08:08:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 351 bytes |
| コンパイル時間 | 505 ms |
| コンパイル使用メモリ | 58,612 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-20 02:21:35 |
| 合計ジャッジ時間 | 10,260 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 51 |
ソースコード
#include<iostream>
#include<cmath>
int main() {
int n;
std::cin >> n;
for (int i = 0; i < n; i++) {
int a, b;
std::cin >> a >> b;
double p = log10(a) * b;
double q = pow(10, p - static_cast<int>(p));
int x = static_cast<int>(q);
int y = (int(q * 10) % 10);
std::cout << x << " " << y << " " << long(p) << std::endl;
}
return 0;
}
hanorver