結果
| 問題 |
No.219 巨大数の概算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-23 14:38:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 1,500 ms |
| コード長 | 442 bytes |
| コンパイル時間 | 1,651 ms |
| コンパイル使用メモリ | 167,124 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-25 10:31:45 |
| 合計ジャッジ時間 | 3,988 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 51 |
ソースコード
#include <bits/stdc++.h>
using i64 = long long;
using std::cout;
using std::endl;
using std::cin;
int main() {
int n; scanf("%d", &n);
while(n--) {
double a, b; scanf("%lf%lf", &a, &b);
double ukunichia = b * std::log10(a);
i64 k = std::floor(ukunichia);
ukunichia -= k;
double beet = std::pow(10, ukunichia);
i64 x = floor(beet);
i64 y = (i64)floor(beet * 10) % 10;
printf("%lld %lld %lld\n", x, y, k);
}
return 0;
}