結果

問題 No.668 6.0*10^23
ユーザー Mcpu3Mcpu3
提出日時 2018-10-18 19:36:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 251 ms / 2,000 ms
コード長 473 bytes
コンパイル時間 2,077 ms
コンパイル使用メモリ 73,708 KB
実行使用メモリ 61,220 KB
最終ジャッジ日時 2023-09-13 20:26:03
合計ジャッジ時間 14,204 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 160 ms
56,892 KB
testcase_01 AC 238 ms
60,876 KB
testcase_02 AC 211 ms
56,864 KB
testcase_03 AC 207 ms
57,048 KB
testcase_04 AC 208 ms
57,176 KB
testcase_05 AC 178 ms
56,708 KB
testcase_06 AC 210 ms
57,488 KB
testcase_07 AC 158 ms
56,680 KB
testcase_08 AC 160 ms
56,888 KB
testcase_09 AC 157 ms
57,064 KB
testcase_10 AC 185 ms
56,888 KB
testcase_11 AC 243 ms
60,200 KB
testcase_12 AC 180 ms
56,960 KB
testcase_13 AC 242 ms
60,280 KB
testcase_14 AC 247 ms
60,272 KB
testcase_15 AC 176 ms
56,712 KB
testcase_16 AC 178 ms
56,772 KB
testcase_17 AC 225 ms
60,548 KB
testcase_18 AC 210 ms
57,128 KB
testcase_19 AC 180 ms
56,608 KB
testcase_20 AC 206 ms
57,076 KB
testcase_21 AC 212 ms
59,160 KB
testcase_22 AC 235 ms
60,132 KB
testcase_23 AC 218 ms
57,856 KB
testcase_24 AC 176 ms
56,916 KB
testcase_25 AC 240 ms
59,712 KB
testcase_26 AC 171 ms
57,076 KB
testcase_27 AC 213 ms
57,232 KB
testcase_28 AC 242 ms
60,592 KB
testcase_29 AC 209 ms
57,012 KB
testcase_30 AC 242 ms
60,472 KB
testcase_31 AC 214 ms
57,216 KB
testcase_32 AC 177 ms
56,856 KB
testcase_33 AC 246 ms
60,656 KB
testcase_34 AC 184 ms
59,188 KB
testcase_35 AC 184 ms
56,568 KB
testcase_36 AC 251 ms
60,784 KB
testcase_37 AC 245 ms
61,120 KB
testcase_38 AC 212 ms
57,348 KB
testcase_39 AC 217 ms
57,232 KB
testcase_40 AC 248 ms
61,220 KB
testcase_41 AC 245 ms
60,196 KB
testcase_42 AC 207 ms
57,116 KB
testcase_43 AC 245 ms
60,248 KB
testcase_44 AC 245 ms
60,092 KB
testcase_45 AC 158 ms
56,960 KB
testcase_46 AC 160 ms
56,960 KB
testcase_47 AC 157 ms
57,080 KB
testcase_48 AC 156 ms
56,888 KB
testcase_49 AC 158 ms
56,892 KB
権限があれば一括ダウンロードができます

ソースコード

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