結果

問題 No.746 7の倍数
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-20 00:21:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 619 ms / 2,000 ms
コード長 396 bytes
コンパイル時間 3,651 ms
コンパイル使用メモリ 71,876 KB
実行使用メモリ 67,848 KB
最終ジャッジ日時 2023-08-12 03:04:30
合計ジャッジ時間 12,810 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,756 KB
testcase_01 AC 118 ms
55,908 KB
testcase_02 AC 126 ms
55,876 KB
testcase_03 AC 608 ms
67,848 KB
testcase_04 AC 174 ms
56,156 KB
testcase_05 AC 249 ms
63,436 KB
testcase_06 AC 367 ms
65,216 KB
testcase_07 AC 323 ms
66,636 KB
testcase_08 AC 389 ms
65,620 KB
testcase_09 AC 328 ms
64,656 KB
testcase_10 AC 241 ms
61,632 KB
testcase_11 AC 521 ms
66,104 KB
testcase_12 AC 619 ms
66,024 KB
testcase_13 AC 456 ms
66,076 KB
testcase_14 AC 487 ms
65,824 KB
testcase_15 AC 478 ms
65,948 KB
testcase_16 AC 467 ms
63,944 KB
testcase_17 AC 485 ms
66,160 KB
testcase_18 AC 500 ms
66,544 KB
testcase_19 AC 449 ms
65,932 KB
testcase_20 AC 327 ms
64,572 KB
testcase_21 AC 281 ms
64,584 KB
testcase_22 AC 511 ms
65,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n=scanner.nextInt();
		int a[]={1,4,2,8,5,7};
		if(n==0){
			System.out.print(0);
			return;
		}
		System.out.print("0.");
		for(int i=0;i<n;i++){
			System.out.print(String.valueOf(a[i%6]));
		}
		System.out.println();
	}
}
0