結果
| 問題 |
No.668 6.0*10^23
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-22 22:57:52 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 492 bytes |
| コンパイル時間 | 2,747 ms |
| コンパイル使用メモリ | 193,448 KB |
| 最終ジャッジ日時 | 2025-01-19 21:07:06 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
return (ull)rng() % B;
}
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
string s; cin >> s;
int n=s.size();
n--;
int a=s[0]-'0',b=s[1]-'0',c=s[2]-'0';
if(c>=5){
b++;
if(b==10){
a++; b=0;
if(a==10){
a=1,b=0;
n++;
}
}
}
printf("%d.%d*10^%d\n",a,b,n);
}