結果

問題 No.746 7の倍数
ユーザー Mcpu3
提出日時 2018-10-19 23:30:50
言語 Java
(openjdk 23)
結果
AC  
実行時間 302 ms / 2,000 ms
コード長 404 bytes
コンパイル時間 2,448 ms
コンパイル使用メモリ 74,416 KB
実行使用メモリ 47,976 KB
最終ジャッジ日時 2024-11-18 22:44:07
合計ジャッジ時間 8,673 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.close();
		String tmp = "142857";
		if (N == 0) System.out.print(0);
		else {
			System.out.print("0.");
			for (int i = 0; i < N / 6; ++i) System.out.print(tmp);
			for (int i = 0; i < N % 6; ++i) System.out.print(tmp.charAt(i));
		}
	}
}
0