結果

問題 No.428 小数から逃げる夢
ユーザー tentententen
提出日時 2023-02-15 12:49:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 96 ms / 1,000 ms
コード長 1,982 bytes
コンパイル時間 3,881 ms
コンパイル使用メモリ 91,644 KB
実行使用メモリ 53,888 KB
最終ジャッジ日時 2023-09-24 22:18:45
合計ジャッジ時間 16,327 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
52,820 KB
testcase_01 AC 84 ms
52,552 KB
testcase_02 AC 93 ms
52,680 KB
testcase_03 AC 83 ms
52,628 KB
testcase_04 AC 84 ms
52,728 KB
testcase_05 AC 85 ms
53,296 KB
testcase_06 AC 83 ms
52,512 KB
testcase_07 AC 84 ms
53,476 KB
testcase_08 AC 94 ms
53,356 KB
testcase_09 AC 85 ms
53,888 KB
testcase_10 AC 85 ms
52,992 KB
testcase_11 AC 84 ms
52,368 KB
testcase_12 AC 83 ms
52,652 KB
testcase_13 AC 93 ms
52,508 KB
testcase_14 AC 83 ms
50,588 KB
testcase_15 AC 87 ms
52,604 KB
testcase_16 AC 85 ms
53,412 KB
testcase_17 AC 84 ms
52,340 KB
testcase_18 AC 84 ms
52,824 KB
testcase_19 AC 85 ms
52,512 KB
testcase_20 AC 84 ms
53,100 KB
testcase_21 AC 83 ms
53,584 KB
testcase_22 AC 92 ms
52,608 KB
testcase_23 AC 85 ms
52,468 KB
testcase_24 AC 83 ms
52,548 KB
testcase_25 AC 83 ms
52,344 KB
testcase_26 AC 85 ms
52,676 KB
testcase_27 AC 94 ms
52,704 KB
testcase_28 AC 85 ms
52,552 KB
testcase_29 AC 83 ms
52,724 KB
testcase_30 AC 84 ms
53,208 KB
testcase_31 AC 85 ms
53,748 KB
testcase_32 AC 85 ms
52,572 KB
testcase_33 AC 83 ms
52,660 KB
testcase_34 AC 85 ms
52,572 KB
testcase_35 AC 83 ms
52,740 KB
testcase_36 AC 83 ms
53,396 KB
testcase_37 AC 85 ms
52,724 KB
testcase_38 AC 85 ms
52,628 KB
testcase_39 AC 94 ms
53,088 KB
testcase_40 AC 84 ms
53,560 KB
testcase_41 AC 95 ms
52,952 KB
testcase_42 AC 84 ms
53,724 KB
testcase_43 AC 87 ms
52,484 KB
testcase_44 AC 84 ms
52,620 KB
testcase_45 AC 89 ms
52,556 KB
testcase_46 AC 84 ms
52,784 KB
testcase_47 AC 82 ms
52,824 KB
testcase_48 AC 90 ms
52,696 KB
testcase_49 AC 84 ms
51,736 KB
testcase_50 AC 87 ms
53,072 KB
testcase_51 AC 83 ms
52,736 KB
testcase_52 AC 84 ms
52,848 KB
testcase_53 AC 87 ms
52,668 KB
testcase_54 AC 84 ms
52,664 KB
testcase_55 AC 81 ms
52,664 KB
testcase_56 AC 81 ms
52,412 KB
testcase_57 AC 82 ms
52,836 KB
testcase_58 AC 84 ms
52,804 KB
testcase_59 AC 82 ms
52,516 KB
testcase_60 AC 84 ms
52,536 KB
testcase_61 AC 84 ms
52,820 KB
testcase_62 AC 84 ms
52,792 KB
testcase_63 AC 82 ms
52,820 KB
testcase_64 AC 83 ms
52,632 KB
testcase_65 AC 84 ms
52,584 KB
testcase_66 AC 83 ms
52,548 KB
testcase_67 AC 93 ms
52,600 KB
testcase_68 AC 85 ms
52,468 KB
testcase_69 AC 85 ms
53,164 KB
testcase_70 AC 83 ms
52,688 KB
testcase_71 AC 82 ms
52,648 KB
testcase_72 AC 91 ms
52,524 KB
testcase_73 AC 82 ms
52,404 KB
testcase_74 AC 91 ms
53,304 KB
testcase_75 AC 92 ms
52,852 KB
testcase_76 AC 82 ms
52,460 KB
testcase_77 AC 82 ms
51,816 KB
testcase_78 AC 82 ms
53,176 KB
testcase_79 AC 91 ms
52,724 KB
testcase_80 AC 85 ms
52,760 KB
testcase_81 AC 85 ms
52,664 KB
testcase_82 AC 84 ms
53,308 KB
testcase_83 AC 87 ms
52,500 KB
testcase_84 AC 83 ms
50,772 KB
testcase_85 AC 82 ms
52,748 KB
testcase_86 AC 85 ms
52,520 KB
testcase_87 AC 82 ms
52,756 KB
testcase_88 AC 83 ms
52,768 KB
testcase_89 AC 84 ms
52,608 KB
testcase_90 AC 83 ms
53,660 KB
testcase_91 AC 92 ms
53,164 KB
testcase_92 AC 83 ms
52,444 KB
testcase_93 AC 92 ms
53,672 KB
testcase_94 AC 91 ms
52,520 KB
testcase_95 AC 84 ms
52,412 KB
testcase_96 AC 88 ms
52,820 KB
testcase_97 AC 90 ms
52,936 KB
testcase_98 AC 80 ms
53,140 KB
testcase_99 AC 91 ms
53,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        int n = sc.nextInt();
        char[] inputs = "1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991".toCharArray();
        int current = 0;
        StringBuilder sb = new StringBuilder();
        for (int i = inputs.length - 1; i >= 0; i--) {
            current += (inputs[i] - '0') * n;
            sb.append(current % 10);
            current /= 10;
        }
        System.out.println(current + "." + sb.reverse());
    }
}
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