結果

問題 No.668 6.0*10^23
ユーザー htensaihtensai
提出日時 2019-11-13 08:57:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 241 ms / 2,000 ms
コード長 583 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 85,392 KB
実行使用メモリ 59,732 KB
最終ジャッジ日時 2023-10-21 19:38:04
合計ジャッジ時間 14,736 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 161 ms
58,124 KB
testcase_01 AC 239 ms
58,892 KB
testcase_02 AC 210 ms
58,664 KB
testcase_03 AC 202 ms
58,692 KB
testcase_04 AC 206 ms
58,548 KB
testcase_05 AC 185 ms
58,528 KB
testcase_06 AC 205 ms
58,436 KB
testcase_07 AC 148 ms
57,652 KB
testcase_08 AC 161 ms
58,340 KB
testcase_09 AC 160 ms
58,288 KB
testcase_10 AC 187 ms
58,520 KB
testcase_11 AC 237 ms
59,584 KB
testcase_12 AC 178 ms
58,184 KB
testcase_13 AC 239 ms
59,568 KB
testcase_14 AC 231 ms
59,424 KB
testcase_15 AC 181 ms
58,320 KB
testcase_16 AC 180 ms
58,528 KB
testcase_17 AC 233 ms
59,608 KB
testcase_18 AC 205 ms
58,440 KB
testcase_19 AC 177 ms
58,520 KB
testcase_20 AC 203 ms
58,664 KB
testcase_21 AC 203 ms
58,572 KB
testcase_22 AC 222 ms
59,540 KB
testcase_23 AC 207 ms
58,888 KB
testcase_24 AC 175 ms
58,516 KB
testcase_25 AC 237 ms
59,504 KB
testcase_26 AC 174 ms
58,512 KB
testcase_27 AC 212 ms
58,584 KB
testcase_28 AC 237 ms
59,488 KB
testcase_29 AC 210 ms
58,708 KB
testcase_30 AC 235 ms
59,676 KB
testcase_31 AC 210 ms
58,784 KB
testcase_32 AC 175 ms
58,440 KB
testcase_33 AC 230 ms
59,464 KB
testcase_34 AC 181 ms
58,288 KB
testcase_35 AC 180 ms
58,308 KB
testcase_36 AC 221 ms
58,588 KB
testcase_37 AC 241 ms
59,488 KB
testcase_38 AC 207 ms
58,508 KB
testcase_39 AC 206 ms
58,656 KB
testcase_40 AC 237 ms
59,732 KB
testcase_41 AC 234 ms
59,148 KB
testcase_42 AC 207 ms
58,684 KB
testcase_43 AC 226 ms
59,472 KB
testcase_44 AC 239 ms
59,280 KB
testcase_45 AC 167 ms
58,268 KB
testcase_46 AC 163 ms
58,376 KB
testcase_47 AC 163 ms
58,436 KB
testcase_48 AC 162 ms
58,280 KB
testcase_49 AC 161 ms
58,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    static final int MOD = 1000000007;
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] arr = sc.next().toCharArray();
		int first = arr[0] - '0';
		int second = arr[1] - '0';
		int third = arr[2] - '0';
		int len = arr.length - 1;
		if (third >= 5) {
		    second++;
		    if (second >= 10) {
		        second = 0;
		        first++;
		        if (first >= 10) {
		            first = 1;
		            len++;
		        }
		    }
		}
		System.out.println(first + "." + second + "*10^" + len);
  }
 }
0