結果
問題 |
No.668 6.0*10^23
|
ユーザー |
👑 |
提出日時 | 2018-03-31 20:42:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 832 bytes |
コンパイル時間 | 529 ms |
コンパイル使用メモリ | 65,632 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 05:43:21 |
合計ジャッジ時間 | 1,768 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 WA * 12 |
ソースコード
#include <iostream> #include <list> #include <string> #include <stdint.h> using namespace std; using uint = unsigned int; using int64 = int64_t; using uint64 = uint64_t; int main() { string s; cin >> s; char a = 0; char b = 0; uint c = 0; uint L = s.size(); for( uint i = 0 ; i < L ; i++ ){ if( i == 0 ){ a = s[i]; } if( i == 1 ){ b = s[i]; c += 1; } if( i == 2 ){ if( s[i] == '5' || s[i] == '6' || s[i] == '7' || s[i] == '8' || s[i] == '9' ){ if( b == 9 ){ b = 0; if( a == 9 ){ a = 1; c += 1; } else { a += 1; } } else { b += 1; } } c += 1; } if( i > 2 ){ c += 1; } } cout << a << "." << b << "*" << "10^" << c << "\n"; }