結果
問題 | No.668 6.0*10^23 |
ユーザー |
![]() |
提出日時 | 2018-05-28 18:48:17 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 547 bytes |
コンパイル時間 | 1,452 ms |
コンパイル使用メモリ | 167,076 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 07:48:02 |
合計ジャッジ時間 | 3,028 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main(){ | ^~~~
ソースコード
#include<bits/stdc++.h>typedef long long ll;using namespace std;int INF = 1LL << 30;int MOD = 1e9+7;main(){string S;cin >> S;char str[2];int size = S.size();if(S.substr(0,2) == "99" && (char)S[2] >= '5'){str[0] = '1', str[1] = '0';size ++;}else if(S[1] == '9' && S[2] >= '5'){str[0] = S[0] + 1, str[1] = '0';}else if(S[2] >= '5'){str[0] = S[0], str[1] = S[1] + 1;}else{str[0] = S[0], str[1] = S[1];}printf("%c.%c*10^%d", str[0], str[1], size-1);}