結果
問題 | No.668 6.0*10^23 |
ユーザー |
![]() |
提出日時 | 2018-04-08 20:27:55 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 1,213 ms |
コンパイル使用メモリ | 159,048 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 05:46:33 |
合計ジャッジ時間 | 2,245 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {string n;cin >> n;int a = n[0] - '0';int b = n[1] - '0';if (n[2] - '0' >= 5) {if (b == 9) {b = 0;a++;}else {b++;}}int c = n.size() - 1;if (a == 10) {a = 1;c++;}cout << fixed;cout <<setprecision(1) << a << '.' << b << "*10^" << c << endl;return 0;}