結果
| 問題 |
No.668 6.0*10^23
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-03 21:26:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 521 bytes |
| コンパイル時間 | 1,590 ms |
| コンパイル使用メモリ | 167,100 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-30 06:26:00 |
| 合計ジャッジ時間 | 2,607 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 47 WA * 3 |
ソースコード
#include "bits/stdc++.h"
#define fastcin {\
cin.tie(0);\
ios::sync_with_stdio(false);\
}
using namespace std;
int main() {
fastcin;
string n;
cin >> n;
for(int i = n.length()-1; i > 1; i--) {
if(n[i] > '4') {
n[i-1]++;
}
n[i] = '0';
}
if(n[1]==':') {
n[1] = '0';
n[0]++;
}
if(n[0]==':') {
cout << "1.0*10^" << n.length() << '\n';
} else cout << n[0] << "." << n[1] << "*10^" << n.length()-1 << '\n';
return 0;
}