結果
| 問題 | No.219 巨大数の概算 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-05-14 04:49:43 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 1,500 ms |
| コード長 | 960 bytes |
| コンパイル時間 | 1,502 ms |
| コンパイル使用メモリ | 166,364 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 12:11:18 |
| 合計ジャッジ時間 | 4,216 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 51 |
ソースコード
#include <bits/stdc++.h>
#define INIT std::ios::sync_with_stdio(false);std::cin.tie(0);
#define VAR(type, a) type a;std::cin>>a;
// VAR(int, x);
#define OUT(d) std::cout<<(d);
#define SP std::cout<<" ";
#define ENDL std::cout<<"\n";
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define MAT(type, c, m, n) std::vector<std::vector<type>> c(m, std::vector<type>(n));for(auto& r:c)for(auto& i:r)std::cin>>i;
#define ALL(a) (a).begin(),(a).end()
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);--i)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
using ll = long long;
signed main(){
INIT;
VAR(int, n);
REP(i, n){
VAR(int, a);VAR(int, b);
double t = b*std::log(a)/std::log(10);
ll ans = std::pow(10, t-std::floor(t))*10;
OUT(ans/10)SP OUT(ans%10)SP OUT(static_cast<ll>(std::floor(t)))ENDL;
}
return 0;
}