結果
問題 | No.668 6.0*10^23 |
ユーザー |
![]() |
提出日時 | 2018-03-24 00:12:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 451 bytes |
コンパイル時間 | 2,107 ms |
コンパイル使用メモリ | 193,452 KB |
最終ジャッジ日時 | 2025-01-05 09:32:06 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include <bits/stdc++.h>using namespace std;using int64 = long long;const int mod = 1e9 + 7;int main() {string N;cin >> N;int ret = N.size() - 1;int top = N[0] - '0';int top2 = N[1] - '0';if(N[2] >= '5') {++top2;if(top2 == 10) {top2 = 0;top++;if(top == 10) {++ret;top = 1;top2 = 0;}}}cout << top << "." << top2 << "*" << 10 << "^" << ret << endl;}