結果

問題 No.668 6.0*10^23
ユーザー Mcpu3
提出日時 2018-10-18 19:36:35
言語 Java
(openjdk 23)
結果
AC  
実行時間 256 ms / 2,000 ms
コード長 473 bytes
コンパイル時間 2,200 ms
コンパイル使用メモリ 76,868 KB
実行使用メモリ 58,228 KB
最終ジャッジ日時 2024-07-01 04:55:07
合計ジャッジ時間 14,377 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char N[] = new char[100002];
		N = sc.next().toCharArray();
		sc.close();
		int length = N.length;
		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];
		}
		System.out.print(N[0] + "." + N[1] + "*10^" + (length - 1));
	}
}
0