結果
問題 | No.668 6.0*10^23 |
ユーザー |
![]() |
提出日時 | 2018-03-23 22:36:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,120 bytes |
コンパイル時間 | 812 ms |
コンパイル使用メモリ | 94,084 KB |
最終ジャッジ日時 | 2024-11-14 20:23:56 |
合計ジャッジ時間 | 1,650 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp:25:21: error: 'numeric_limits' is not a member of 'std' 25 | const ll INF = std::numeric_limits<long long>::max(); | ^~~~~~~~~~~~~~ main.cpp:25:36: error: expected primary-expression before 'long' 25 | const ll INF = std::numeric_limits<long long>::max(); | ^~~~
ソースコード
# include <iostream># include <algorithm># include <vector># include <string># include <set># include <map># include <cmath># include <iomanip># include <functional># include <utility># include <stack># include <queue># include <list># include <bitset># include <complex>#include<limits.h>#include<unordered_map>#include<unordered_set>#include<deque>#include<cstdio>using namespace std;typedef long long int ll;const int N = 1000000;const ll mod = 1000000007;const ll INF = std::numeric_limits<long long>::max();#define rep(i,n) for(ll i=(ll)0;i<(ll)n;++i)#define srep(i,s) rep(i,(ll)s.size())#define vin(n,v) rep(i,n)cin>>v[i]#define ALL(x) x.begin(),x.end()#define pp pair<ll,ll>#define fi first#define se second#define sz sizevoid YN(bool b) { cout << (b ? "YES" : "NO") << endl; }void yn(bool b) { cout << (b ? "Yes" : "No") << endl; }int main(){string s;cin >> s;int ct = s.size() - 1;double n=0;n += s[0] - '0';n += (double)(s[1] - '0') / 10+(s[2]-'0'>4?0.1:0);if (n == 10) { ++ct; n = 1.0; }cout <<fixed<<setprecision(1)<< n << "*10^" << ct << endl;return 0;}