結果

問題 No.668 6.0*10^23
ユーザー tentententen
提出日時 2023-02-15 15:51:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 1,920 bytes
コンパイル時間 2,632 ms
コンパイル使用メモリ 89,568 KB
実行使用メモリ 54,420 KB
最終ジャッジ日時 2023-09-25 00:44:05
合計ジャッジ時間 10,245 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
50,356 KB
testcase_01 AC 113 ms
53,868 KB
testcase_02 AC 102 ms
52,920 KB
testcase_03 AC 96 ms
52,576 KB
testcase_04 AC 96 ms
53,440 KB
testcase_05 AC 95 ms
53,752 KB
testcase_06 AC 98 ms
52,876 KB
testcase_07 AC 81 ms
52,640 KB
testcase_08 AC 82 ms
52,612 KB
testcase_09 AC 84 ms
53,376 KB
testcase_10 AC 75 ms
51,804 KB
testcase_11 AC 119 ms
54,352 KB
testcase_12 AC 95 ms
52,576 KB
testcase_13 AC 101 ms
52,396 KB
testcase_14 AC 113 ms
53,944 KB
testcase_15 AC 71 ms
50,436 KB
testcase_16 AC 72 ms
50,708 KB
testcase_17 AC 123 ms
54,292 KB
testcase_18 AC 79 ms
50,488 KB
testcase_19 AC 73 ms
50,540 KB
testcase_20 AC 107 ms
53,992 KB
testcase_21 AC 109 ms
54,200 KB
testcase_22 AC 117 ms
54,240 KB
testcase_23 AC 106 ms
52,920 KB
testcase_24 AC 95 ms
53,668 KB
testcase_25 AC 125 ms
53,964 KB
testcase_26 AC 82 ms
53,908 KB
testcase_27 AC 117 ms
53,600 KB
testcase_28 AC 118 ms
54,116 KB
testcase_29 AC 98 ms
53,688 KB
testcase_30 AC 125 ms
54,016 KB
testcase_31 AC 110 ms
54,224 KB
testcase_32 AC 90 ms
52,692 KB
testcase_33 AC 116 ms
54,252 KB
testcase_34 AC 99 ms
53,360 KB
testcase_35 AC 96 ms
52,672 KB
testcase_36 AC 114 ms
54,024 KB
testcase_37 AC 119 ms
54,420 KB
testcase_38 AC 97 ms
52,624 KB
testcase_39 AC 112 ms
54,192 KB
testcase_40 AC 121 ms
54,388 KB
testcase_41 AC 116 ms
54,248 KB
testcase_42 AC 100 ms
53,652 KB
testcase_43 AC 116 ms
54,352 KB
testcase_44 AC 94 ms
52,652 KB
testcase_45 AC 79 ms
52,200 KB
testcase_46 AC 83 ms
54,012 KB
testcase_47 AC 80 ms
52,436 KB
testcase_48 AC 82 ms
53,000 KB
testcase_49 AC 65 ms
50,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.util.stream.*;

public class Main {
    static final int MOD = 17;
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        char[] inputs = sc.next().toCharArray();
        int a = inputs[0] - '0';
        int b = inputs[1] - '0';
        if (inputs[2] >= '5') {
            b++;
            if (b == 10) {
                b = 0;
                a++;
                if (a == 10) {
                    System.out.println("1.0*10^" + inputs.length);
                    return;
                }
            }
        }
        System.out.println(a + "." + b + "*10^" + (inputs.length - 1));
    }
}
class Utilities {
    static String arrayToLineString(Object[] arr) {
        return Arrays.stream(arr).map(x -> x.toString()).collect(Collectors.joining("\n"));
    }
    
    static String arrayToLineString(int[] arr) {
        return String.join("\n", Arrays.stream(arr).mapToObj(String::valueOf).toArray(String[]::new));
    }
}
class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    StringBuilder sb = new StringBuilder();
    
    public Scanner() throws Exception {
        
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    
    public double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }
    
    public int[] nextIntArray() throws Exception {
        return Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
    }
    
    public String next() throws Exception {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
    
}
0