結果

問題 No.668 6.0*10^23
ユーザー 🍮かんプリン
提出日時 2019-03-08 11:52:11
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 1,038 ms
コンパイル使用メモリ 55,264 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-01 19:30:44
合計ジャッジ時間 1,855 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
    string s;
    int n;
    cin >> s;
    n = ((int)s[0] - '0') * 100 + ((int)s[1] - '0') * 10 + ((int)s[2] - '0');
    n = (n + 5) / 10 * 10;
    cout << n << endl;
    if (n / 1000 >= 1) {
        cout << n / 1000 << "." << n % 1000 / 100 << "*10^" << (int)s.length() << endl;
    }
    else {
        cout << n / 100 << "." << n % 100 / 10 << "*10^" << (int)s.length() - 1 << endl;
    }
    return 0;
}
0