結果

問題 No.744 循環小数N桁目 Easy
ユーザー tentententen
提出日時 2020-11-12 11:38:29
言語 Java19
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 3,094 ms
コンパイル使用メモリ 71,244 KB
実行使用メモリ 55,920 KB
最終ジャッジ日時 2023-09-30 01:12:48
合計ジャッジ時間 4,463 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,560 KB
testcase_01 AC 124 ms
55,548 KB
testcase_02 AC 122 ms
55,820 KB
testcase_03 AC 125 ms
55,920 KB
testcase_04 AC 127 ms
55,780 KB
testcase_05 AC 129 ms
55,492 KB
testcase_06 AC 122 ms
55,920 KB
testcase_07 AC 121 ms
55,652 KB
testcase_08 AC 125 ms
55,748 KB
testcase_09 AC 123 ms
55,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt() - 1;
        int[] arr = new int[]{2, 8, 5, 7, 1, 4};
        System.out.println(arr[n % arr.length]);
    }
}
0