結果

問題 No.744 循環小数N桁目 Easy
ユーザー tenten
提出日時 2020-11-12 11:38:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 1,644 ms
コンパイル使用メモリ 74,456 KB
実行使用メモリ 41,252 KB
最終ジャッジ日時 2024-07-22 19:09:40
合計ジャッジ時間 3,314 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

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