結果
| 問題 |
No.219 巨大数の概算
|
| コンテスト | |
| ユーザー |
alpha_virginis
|
| 提出日時 | 2015-05-29 23:49:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 645 bytes |
| コンパイル時間 | 1,153 ms |
| コンパイル使用メモリ | 159,852 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-06 12:14:24 |
| 合計ジャッジ時間 | 9,005 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 51 |
ソースコード
#include <bits/stdc++.h>
inline long nextInt(void) {
long temp;
std::cin >> temp;
return temp;
}
int main() {
long N;
long A, B;
double temp;
long X, Y, Z;
std::cin >> N;
for(int i = 0; i < N; ++i) {
std::cin >> A >> B;
temp = B * log10(A);
if( temp < 5 ) {
X = pow(A, B);
Z = 1;
while( X >= 100 ) {
Z += 1;
X /= 10;
}
std::cout << X/10 << " " << X%10 << " " << Z << std::endl;
continue;
}
Z = (int)temp;
temp -= (int)temp;
X = pow(10, temp) * 10;
Y = X%10;
X /= 10;
std::cout << X << " " << Y << " " << Z << std::endl;
}
return 0;
}
alpha_virginis