結果
問題 | No.668 6.0*10^23 |
ユーザー |
|
提出日時 | 2018-04-23 11:27:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 390 bytes |
コンパイル時間 | 604 ms |
コンパイル使用メモリ | 65,204 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 06:12:15 |
合計ジャッジ時間 | 1,917 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include <iostream>#include <string>int main() {using namespace std;string n;cin >> n;int a = 0, b = 0, c = 0;c = n.length() - 1;a = n[0] - '0';b = n[1] - '0';if (n[2] - '0' > 4) {b++;a += b / 10;b = b % 10;if (a > 9) {a = 1; c++;}}cout << a << "." << b << "*10^" << c << endl;}