結果
| 問題 |
No.668 6.0*10^23
|
| コンテスト | |
| ユーザー |
yuruhiya
|
| 提出日時 | 2019-01-19 21:45:06 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 316 bytes |
| コンパイル時間 | 458 ms |
| コンパイル使用メモリ | 58,696 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-01 10:23:36 |
| 合計ジャッジ時間 | 1,894 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int n = stoi(s.substr(0, 3));
n = n % 10 >= 5 ? n / 10 * 10 + 10 : n / 10 * 10;
int c = s.size() + to_string(n).size() - 4;
string ab = to_string(n).substr(0, 2).insert(1, ".");
cout << ab << "*10^" << c << endl;
}
yuruhiya