結果
問題 |
No.668 6.0*10^23
|
ユーザー |
![]() |
提出日時 | 2018-11-27 21:17:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 1,038 bytes |
コンパイル時間 | 832 ms |
コンパイル使用メモリ | 96,656 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 05:18:31 |
合計ジャッジ時間 | 2,322 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
//g++ -std=c++11 -Wall -O2 -o main.exe main.cpp //g++ -std=c++14 -Wall -O2 -o main.exe main.cpp #include <cstdio> #include <cstdlib> #include <cmath> #include <iostream> #include <iomanip> #include <string> #include <vector> #include <map> #include <queue> #include <stack> #include <tuple> #include <functional> #include <algorithm> #include <complex> #include <numeric> using namespace std; #define spc " " #define MOD 1000000007 typedef long long ll; typedef long double ld; typedef pair<int, int> p_ii; typedef tuple<int, int, int, int> tup; bool tupComp(tup &t1, tup &t2){ return get<2>(t1) > get<2>(t2); } //------------------------------------------------------------------------------ int main(){ string s; cin >> s; int a = (int)(s[0] - '0'), b = (int)(s[1] - '0'), b2 = (int)(s[2] - '0'), c = s.size() - 1; if(b2 >= 5){ if(b == 9){ if(a == 9) a = 1, b = 0, c++; else a++, b = 0; } else b++; } printf("%d.%d*10^%d\n", a, b, c); return 0; }