結果
| 問題 |
No.747 循環小数N桁目 Hard
|
| コンテスト | |
| ユーザー |
nuhehe130
|
| 提出日時 | 2018-10-30 22:57:07 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 640 bytes |
| コンパイル時間 | 3,143 ms |
| コンパイル使用メモリ | 74,396 KB |
| 実行使用メモリ | 57,304 KB |
| 最終ジャッジ日時 | 2024-11-19 10:58:30 |
| 合計ジャッジ時間 | 26,665 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 RE * 2 |
| other | WA * 24 RE * 96 |
ソースコード
package test;
import java.util.Scanner;
public class test {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
String str1 = scn.nextLine();
String str2 = scn.nextLine();
int ints[] = {2,8,5,7,1,4};
int N = Integer.parseInt(str1);
int K = Integer.parseInt(str2);
int keta = 1;
//NのK乗桁目
for (int i = 0;i < K ;i++) {
keta *= N;
}
// System.out.println(keta);
keta %= 6;
System.out.println(ints[keta]);
scn.close();
}
}
nuhehe130