結果
| 問題 |
No.668 6.0*10^23
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-05 20:57:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 461 bytes |
| コンパイル時間 | 1,668 ms |
| コンパイル使用メモリ | 168,640 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-23 05:31:30 |
| 合計ジャッジ時間 | 3,499 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
if(stoi(s.substr(0, 3)) >= 995){
cout << "1.0*10^" << s.size() << '\n';
return 0;
}
int ans;
if(stoi(s.substr(2, 1)) >= 5){
ans = stoi(s.substr(0, 2)) + 1;
}else{
ans = stoi(s.substr(0, 2));
}
cout << ans / 10 << "." << ans % 10 << "*10^" << s.size() - 1 << '\n';
}