結果

問題 No.428 小数から逃げる夢
ユーザー tentententen
提出日時 2022-10-12 18:33:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 93 ms / 1,000 ms
コード長 1,443 bytes
コンパイル時間 3,759 ms
コンパイル使用メモリ 74,908 KB
実行使用メモリ 54,068 KB
最終ジャッジ日時 2023-09-08 18:36:00
合計ジャッジ時間 15,347 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
52,860 KB
testcase_01 AC 90 ms
52,756 KB
testcase_02 AC 89 ms
52,740 KB
testcase_03 AC 86 ms
52,404 KB
testcase_04 AC 89 ms
52,552 KB
testcase_05 AC 88 ms
52,928 KB
testcase_06 AC 81 ms
52,644 KB
testcase_07 AC 79 ms
53,580 KB
testcase_08 AC 90 ms
52,576 KB
testcase_09 AC 90 ms
52,448 KB
testcase_10 AC 79 ms
52,404 KB
testcase_11 AC 78 ms
52,712 KB
testcase_12 AC 82 ms
53,032 KB
testcase_13 AC 88 ms
50,728 KB
testcase_14 AC 89 ms
52,564 KB
testcase_15 AC 88 ms
52,560 KB
testcase_16 AC 79 ms
53,852 KB
testcase_17 AC 90 ms
53,052 KB
testcase_18 AC 90 ms
53,108 KB
testcase_19 AC 83 ms
52,460 KB
testcase_20 AC 82 ms
53,384 KB
testcase_21 AC 77 ms
52,840 KB
testcase_22 AC 88 ms
53,412 KB
testcase_23 AC 78 ms
52,460 KB
testcase_24 AC 81 ms
52,452 KB
testcase_25 AC 79 ms
52,652 KB
testcase_26 AC 88 ms
52,596 KB
testcase_27 AC 79 ms
53,656 KB
testcase_28 AC 87 ms
52,564 KB
testcase_29 AC 81 ms
53,012 KB
testcase_30 AC 78 ms
52,596 KB
testcase_31 AC 88 ms
52,308 KB
testcase_32 AC 90 ms
53,516 KB
testcase_33 AC 77 ms
52,644 KB
testcase_34 AC 89 ms
53,604 KB
testcase_35 AC 80 ms
51,100 KB
testcase_36 AC 81 ms
52,416 KB
testcase_37 AC 85 ms
52,868 KB
testcase_38 AC 82 ms
52,364 KB
testcase_39 AC 78 ms
53,592 KB
testcase_40 AC 85 ms
52,584 KB
testcase_41 AC 87 ms
52,720 KB
testcase_42 AC 88 ms
53,060 KB
testcase_43 AC 89 ms
52,628 KB
testcase_44 AC 88 ms
52,624 KB
testcase_45 AC 83 ms
52,636 KB
testcase_46 AC 89 ms
52,640 KB
testcase_47 AC 88 ms
53,804 KB
testcase_48 AC 77 ms
52,464 KB
testcase_49 AC 89 ms
52,620 KB
testcase_50 AC 88 ms
52,464 KB
testcase_51 AC 82 ms
52,780 KB
testcase_52 AC 81 ms
52,600 KB
testcase_53 AC 86 ms
52,692 KB
testcase_54 AC 83 ms
50,356 KB
testcase_55 AC 90 ms
52,660 KB
testcase_56 AC 79 ms
53,624 KB
testcase_57 AC 81 ms
50,508 KB
testcase_58 AC 88 ms
52,628 KB
testcase_59 AC 90 ms
52,824 KB
testcase_60 AC 89 ms
51,492 KB
testcase_61 AC 80 ms
53,612 KB
testcase_62 AC 86 ms
52,652 KB
testcase_63 AC 89 ms
52,572 KB
testcase_64 AC 90 ms
52,468 KB
testcase_65 AC 88 ms
52,852 KB
testcase_66 AC 89 ms
53,028 KB
testcase_67 AC 83 ms
52,564 KB
testcase_68 AC 83 ms
53,028 KB
testcase_69 AC 93 ms
52,520 KB
testcase_70 AC 89 ms
51,212 KB
testcase_71 AC 83 ms
51,100 KB
testcase_72 AC 80 ms
52,548 KB
testcase_73 AC 89 ms
52,632 KB
testcase_74 AC 80 ms
52,392 KB
testcase_75 AC 88 ms
52,684 KB
testcase_76 AC 84 ms
52,472 KB
testcase_77 AC 83 ms
52,436 KB
testcase_78 AC 79 ms
52,504 KB
testcase_79 AC 78 ms
52,804 KB
testcase_80 AC 77 ms
52,812 KB
testcase_81 AC 87 ms
52,632 KB
testcase_82 AC 90 ms
52,356 KB
testcase_83 AC 89 ms
52,584 KB
testcase_84 AC 79 ms
52,496 KB
testcase_85 AC 89 ms
52,364 KB
testcase_86 AC 81 ms
52,156 KB
testcase_87 AC 81 ms
53,500 KB
testcase_88 AC 81 ms
53,048 KB
testcase_89 AC 91 ms
53,708 KB
testcase_90 AC 88 ms
52,580 KB
testcase_91 AC 88 ms
52,440 KB
testcase_92 AC 90 ms
52,660 KB
testcase_93 AC 81 ms
52,960 KB
testcase_94 AC 79 ms
52,568 KB
testcase_95 AC 80 ms
52,472 KB
testcase_96 AC 79 ms
52,884 KB
testcase_97 AC 84 ms
54,068 KB
testcase_98 AC 80 ms
52,336 KB
testcase_99 AC 88 ms
53,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    static char[] D = "1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991".toCharArray();
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        int n = sc.nextInt();
        int base = 0;
        StringBuilder sb = new StringBuilder();
        for (int i = D.length - 1; i >= 0; i--) {
            base += n * (D[i] - '0');
            sb.append(base % 10);
            base /= 10;
        }
        System.out.println(base + "." + sb.reverse());
    }
}
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 String next() throws Exception {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
    
}
0