結果
| 問題 |
No.668 6.0*10^23
|
| コンテスト | |
| ユーザー |
hiyokko2
|
| 提出日時 | 2018-03-23 22:43:50 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 1,019 bytes |
| コンパイル時間 | 547 ms |
| コンパイル使用メモリ | 73,000 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 05:11:26 |
| 合計ジャッジ時間 | 1,814 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <iostream>
#include <vector>
#include <string.h>
#include <stack>
#include <queue>
#include <algorithm>
#include <climits>
#include <cmath>
#include <map>
#include <set>
#include <assert.h>
#define REP(i,n) for(ll i=0;i<(n);i++)
#define MOD 1000000007
#define int long long
#ifdef int
const long long INF = LLONG_MAX / 10;
#else
const int INF = 1010101010;
#endif
using namespace std;
typedef long long ll;
typedef vector<vector<ll> > mat;
typedef pair<int, int> P;
//typedef pair<double, double> P;
const int dx[9] = {-1, 0, 0, 1, -1, -1, 1, 1, 0};
const int dy[9] = {0, -1, 1, 0, -1, 1, -1, 1, 0};
string N;
signed main()
{
cin >> N;
int num[3];
REP(i,3) {
num[i] = N[i] - '0';
}
if (num[0] == 9 && num[1] == 9 && num[2] >= 5) {
//assert(false);
cout << "1.0*10^" << N.length() << endl;
return 0;
}
if (num[2] >= 5) {
num[1]++;
if (num[1] == 10) {
num[1] = 0;
num[0]++;
}
}
cout << num[0] << "." << num[1] << "*10^" << N.length() - 1 << endl;
}
hiyokko2