結果
問題 |
No.668 6.0*10^23
|
ユーザー |
![]() |
提出日時 | 2018-03-23 23:41:55 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 444 bytes |
コンパイル時間 | 818 ms |
コンパイル使用メモリ | 74,316 KB |
最終ジャッジ日時 | 2025-01-05 09:24:48 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include<algorithm> #include<cstdlib> #include<iostream> #include<vector> using namespace std; typedef long long lint; typedef vector<int>vi; typedef pair<int,int>pii; #define rep(i,n)for(int i=0;i<(int)(n);++i) int main(){ string s; cin>>s; int n=s.length()-1; s=s.substr(0,3); int v=atoi(s.c_str()); if(v>=995){ v=100;n++; } if(v%10>=5){ v=v/10+1; }else{ v=v/10; } cout<<v/10<<"."<<v%10<<"*10^"<<n<<endl; }