結果
| 問題 | No.668 6.0*10^23 |
| コンテスト | |
| ユーザー |
ats5515
|
| 提出日時 | 2018-03-23 22:30:02 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 738 bytes |
| 記録 | |
| コンパイル時間 | 626 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 05:05:36 |
| 合計ジャッジ時間 | 1,803 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
int N = (int)S.size() - 1;
if ((S[2] - '0') < 5) {
cout << S[0] << "." << S[1] << "*10^" << N << endl;
}
else {
int k = (int)(S[1] - '0') + 1;
if (k == 10) {
k = (int)(S[0] - '0') + 1;
if (k == 10) {
cout << 1 << "." << 0 << "*10^" << N + 1 << endl;
}
else {
cout << k << "." << 0 << "*10^" << N << endl;
}
}
else {
cout << S[0] << "." << k << "*10^" << N << endl;
}
}
}
ats5515