結果
問題 |
No.219 巨大数の概算
|
ユーザー |
![]() |
提出日時 | 2015-05-29 23:47:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 645 bytes |
コンパイル時間 | 1,131 ms |
コンパイル使用メモリ | 160,564 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 12:13:48 |
合計ジャッジ時間 | 9,035 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 < 3 ) { 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; }