結果
| 問題 |
No.668 6.0*10^23
|
| コンテスト | |
| ユーザー |
ama_nuko
|
| 提出日時 | 2018-07-13 18:30:08 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 761 bytes |
| コンパイル時間 | 857 ms |
| コンパイル使用メモリ | 95,692 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-01 03:10:16 |
| 合計ジャッジ時間 | 2,307 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 WA * 19 |
ソースコード
#include <cmath>
#include <iostream>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <utility>
#include <iomanip>
#define int long long int
#define rep(i, n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef pair<int, int> P;
const int INF = 1e15;
const int MOD = 1e9+7;
signed main(){
string n;
cin >> n;
int head = 0;
rep(i, 3){
head *= 10;
head += n[i] - '0';
}
if(995 <= head && head <= 999){
cout << "1.0*10^" << n.length() << endl;
return 0;
}
double ans = (double)head / 100.0;
if(head % 10 >= 5){
ans += 0.1;
}
cout << fixed << setprecision(1) << ans << "*10^" << n.length() - 1 << endl;
return 0;
}
ama_nuko