結果
問題 | No.219 巨大数の概算 |
ユーザー |
|
提出日時 | 2022-08-24 11:31:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 491 bytes |
コンパイル時間 | 1,725 ms |
コンパイル使用メモリ | 169,524 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 21:12:02 |
合計ジャッジ時間 | 10,222 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 51 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll = long long;int main(){ios::sync_with_stdio(false);cin.tie(0);int T, A, B;cin >> T;vector<double> tb;for(int i = 1; i <= 99; i++)tb.push_back(log10(double(i) / 10));while(T--){cin >> A >> B;double ans = B * log10(A);int s = lower_bound(tb.begin(), tb.end(), ans - floor(ans)) - tb.begin();cout << s / 10 << " " << s % 10 << " " << int(floor(ans)) << '\n';}}