結果
| 問題 | No.219 巨大数の概算 |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2016-04-12 14:04:45 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 826 bytes |
| 記録 | |
| コンパイル時間 | 529 ms |
| コンパイル使用メモリ | 85,400 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-04 07:15:14 |
| 合計ジャッジ時間 | 9,350 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 51 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 219.cc: No.219 巨大数の概算 - yukicoder
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
/* constant */
/* typedef */
/* global variables */
/* subroutines */
/* main */
int main() {
int n;
cin >> n;
while (n--) {
int a, b;
cin >> a >> b;
double l10 = log10((double)a) * b;
int z = (int)l10;
double xy = pow(10.0, l10 - z);
//printf("%lf %d\n", xy, z);
int x = (int)xy % 10;
int y = (int)(xy * 10) % 10;
printf("%d %d %d\n", x, y, z);
}
return 0;
}
tnakao0123