結果
問題 | No.668 6.0*10^23 |
ユーザー |
![]() |
提出日時 | 2018-06-06 17:50:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 833 bytes |
コンパイル時間 | 570 ms |
コンパイル使用メモリ | 72,828 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-30 10:17:33 |
合計ジャッジ時間 | 2,104 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include<cstdio>#include<cstring>#include<vector>#include<queue>#include<stack>#include<algorithm>#include<cmath>#include<climits>#include<string>#include<set>#include<numeric>#include<map>#include<iostream>using namespace std;#define rep(i,n) for(int i = 0;i<((int)(n));i++)#define reg(i,a,b) for(int i = ((int)(a));i<=((int)(b));i++)#define irep(i,n) for(int i = ((int)(n)-1);i>=0;i--)#define ireg(i,a,b) for(int i = ((int)(b));i>=((int)(a));i--)typedef long long ll;typedef pair<ll, ll> mp;ll mod = 1e9+7;ll inf = 1e18;//WAint main(void){string N;int a,b,c;cin>>N;c=N.size()-1;int last[4];rep(i,3)last[i]=N[i]-'0';if(last[2]>=5)last[1]++;if(last[1]>9){last[1]=0;last[0]++;}if(last[0]>9){a=1;b=0;c++;}else{a=last[0];b=last[1];}printf("%d.%d*10^%d\n",a,b,c);}