結果
問題 | No.428 小数から逃げる夢 |
ユーザー | tenten |
提出日時 | 2023-02-15 12:49:28 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 88 ms / 1,000 ms |
コード長 | 1,982 bytes |
コンパイル時間 | 2,447 ms |
コンパイル使用メモリ | 96,000 KB |
実行使用メモリ | 53,132 KB |
最終ジャッジ日時 | 2024-07-17 22:39:08 |
合計ジャッジ時間 | 12,829 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 78 ms
51,064 KB |
testcase_01 | AC | 78 ms
51,396 KB |
testcase_02 | AC | 72 ms
51,548 KB |
testcase_03 | AC | 75 ms
51,396 KB |
testcase_04 | AC | 76 ms
51,712 KB |
testcase_05 | AC | 87 ms
53,100 KB |
testcase_06 | AC | 75 ms
51,476 KB |
testcase_07 | AC | 75 ms
51,500 KB |
testcase_08 | AC | 76 ms
51,300 KB |
testcase_09 | AC | 83 ms
51,352 KB |
testcase_10 | AC | 77 ms
51,472 KB |
testcase_11 | AC | 84 ms
50,920 KB |
testcase_12 | AC | 74 ms
51,404 KB |
testcase_13 | AC | 78 ms
51,148 KB |
testcase_14 | AC | 76 ms
51,316 KB |
testcase_15 | AC | 77 ms
51,404 KB |
testcase_16 | AC | 84 ms
51,344 KB |
testcase_17 | AC | 77 ms
51,544 KB |
testcase_18 | AC | 76 ms
51,416 KB |
testcase_19 | AC | 76 ms
51,180 KB |
testcase_20 | AC | 75 ms
51,424 KB |
testcase_21 | AC | 79 ms
51,396 KB |
testcase_22 | AC | 77 ms
51,300 KB |
testcase_23 | AC | 77 ms
51,296 KB |
testcase_24 | AC | 76 ms
51,604 KB |
testcase_25 | AC | 78 ms
53,096 KB |
testcase_26 | AC | 81 ms
53,116 KB |
testcase_27 | AC | 75 ms
51,064 KB |
testcase_28 | AC | 77 ms
51,364 KB |
testcase_29 | AC | 84 ms
51,340 KB |
testcase_30 | AC | 81 ms
51,304 KB |
testcase_31 | AC | 76 ms
51,168 KB |
testcase_32 | AC | 76 ms
51,552 KB |
testcase_33 | AC | 72 ms
51,396 KB |
testcase_34 | AC | 74 ms
53,064 KB |
testcase_35 | AC | 76 ms
51,024 KB |
testcase_36 | AC | 76 ms
51,360 KB |
testcase_37 | AC | 76 ms
51,048 KB |
testcase_38 | AC | 77 ms
51,380 KB |
testcase_39 | AC | 75 ms
51,448 KB |
testcase_40 | AC | 75 ms
51,184 KB |
testcase_41 | AC | 74 ms
51,328 KB |
testcase_42 | AC | 84 ms
51,196 KB |
testcase_43 | AC | 75 ms
51,028 KB |
testcase_44 | AC | 75 ms
51,680 KB |
testcase_45 | AC | 73 ms
51,408 KB |
testcase_46 | AC | 76 ms
51,516 KB |
testcase_47 | AC | 76 ms
52,824 KB |
testcase_48 | AC | 76 ms
51,536 KB |
testcase_49 | AC | 75 ms
51,324 KB |
testcase_50 | AC | 79 ms
51,420 KB |
testcase_51 | AC | 74 ms
51,324 KB |
testcase_52 | AC | 77 ms
51,424 KB |
testcase_53 | AC | 76 ms
51,268 KB |
testcase_54 | AC | 74 ms
50,952 KB |
testcase_55 | AC | 83 ms
51,348 KB |
testcase_56 | AC | 86 ms
53,060 KB |
testcase_57 | AC | 76 ms
51,320 KB |
testcase_58 | AC | 78 ms
51,576 KB |
testcase_59 | AC | 77 ms
51,180 KB |
testcase_60 | AC | 73 ms
51,320 KB |
testcase_61 | AC | 74 ms
51,328 KB |
testcase_62 | AC | 82 ms
50,984 KB |
testcase_63 | AC | 77 ms
51,428 KB |
testcase_64 | AC | 74 ms
51,084 KB |
testcase_65 | AC | 82 ms
52,856 KB |
testcase_66 | AC | 81 ms
51,348 KB |
testcase_67 | AC | 88 ms
52,888 KB |
testcase_68 | AC | 85 ms
51,356 KB |
testcase_69 | AC | 75 ms
51,208 KB |
testcase_70 | AC | 84 ms
51,472 KB |
testcase_71 | AC | 76 ms
51,464 KB |
testcase_72 | AC | 75 ms
51,420 KB |
testcase_73 | AC | 77 ms
51,012 KB |
testcase_74 | AC | 74 ms
51,332 KB |
testcase_75 | AC | 76 ms
51,532 KB |
testcase_76 | AC | 79 ms
51,448 KB |
testcase_77 | AC | 76 ms
51,136 KB |
testcase_78 | AC | 85 ms
51,412 KB |
testcase_79 | AC | 77 ms
51,272 KB |
testcase_80 | AC | 81 ms
51,564 KB |
testcase_81 | AC | 78 ms
51,604 KB |
testcase_82 | AC | 84 ms
51,152 KB |
testcase_83 | AC | 79 ms
51,344 KB |
testcase_84 | AC | 73 ms
51,184 KB |
testcase_85 | AC | 76 ms
53,020 KB |
testcase_86 | AC | 79 ms
51,344 KB |
testcase_87 | AC | 76 ms
51,308 KB |
testcase_88 | AC | 73 ms
51,352 KB |
testcase_89 | AC | 84 ms
51,204 KB |
testcase_90 | AC | 80 ms
51,120 KB |
testcase_91 | AC | 77 ms
51,076 KB |
testcase_92 | AC | 79 ms
51,488 KB |
testcase_93 | AC | 81 ms
51,456 KB |
testcase_94 | AC | 73 ms
51,544 KB |
testcase_95 | AC | 83 ms
53,132 KB |
testcase_96 | AC | 82 ms
51,156 KB |
testcase_97 | AC | 75 ms
51,428 KB |
testcase_98 | AC | 76 ms
51,168 KB |
testcase_99 | AC | 80 ms
51,340 KB |
ソースコード
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(); } }