結果
問題 | No.219 巨大数の概算 |
ユーザー |
|
提出日時 | 2022-08-24 11:38:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 490 bytes |
コンパイル時間 | 1,534 ms |
コンパイル使用メモリ | 169,428 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 21:18:27 |
合計ジャッジ時間 | 5,052 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 46 WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); ll 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); ll s = lower_bound(tb.begin(), tb.end(), ans - floor(ans)) - tb.begin(); cout << s / 10 << " " << s % 10 << " " << (ll)(floor(ans)) << '\n'; } }