結果
| 問題 | 
                            No.668 6.0*10^23
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-10-18 19:40:36 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 4 ms / 2,000 ms | 
| コード長 | 355 bytes | 
| コンパイル時間 | 527 ms | 
| コンパイル使用メモリ | 63,272 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-01 04:54:28 | 
| 合計ジャッジ時間 | 1,934 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 50 | 
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
	int length;
	string N;
	cin >> N;
	length = N.size();
	if (N[2] >= '5') {
		if (N[1] == '9') {
			N[1] = '0';
			if (N[0] == '9') {
				N[0] = '1';
				++length;
			}
			else ++N[0];
		}
		else ++N[1];
	}
	cout << N[0] << "." << N[1] << "*10^" << length - 1;
}