結果

問題 No.668 6.0*10^23
ユーザー ミドリムシミドリムシ
提出日時 2018-05-25 06:39:15
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 406 bytes
コンパイル時間 703 ms
コンパイル使用メモリ 73,928 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-30 07:15:30
合計ジャッジ時間 2,530 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
using namespace std;

int main(){
    string N;
    cin >> N;
    int N_decimal_round = (stoi(N.substr(0, 3)) * 2 / 10 + 1) / 2;
    if(N_decimal_round == 100){
        cout << "1.0*10^" << N.size() << endl;
    }else{
        cout << N_decimal_round / 10 << "." << N_decimal_round % 10 << "*10^" << N.size() - 1 << endl;
    }
}
0