結果

問題 No.746 7の倍数
ユーザー 37zigen37zigen
提出日時 2020-02-18 11:04:44
言語 Java19
(openjdk 21)
結果
AC  
実行時間 498 ms / 2,000 ms
コード長 474 bytes
コンパイル時間 2,320 ms
コンパイル使用メモリ 76,212 KB
実行使用メモリ 60,660 KB
最終ジャッジ日時 2023-07-28 20:14:09
合計ジャッジ時間 10,490 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,348 KB
testcase_01 AC 126 ms
55,792 KB
testcase_02 AC 127 ms
56,360 KB
testcase_03 AC 498 ms
60,660 KB
testcase_04 AC 147 ms
57,508 KB
testcase_05 AC 195 ms
58,748 KB
testcase_06 AC 318 ms
60,104 KB
testcase_07 AC 277 ms
59,528 KB
testcase_08 AC 313 ms
59,664 KB
testcase_09 AC 275 ms
60,156 KB
testcase_10 AC 196 ms
58,448 KB
testcase_11 AC 475 ms
60,480 KB
testcase_12 AC 474 ms
60,136 KB
testcase_13 AC 345 ms
60,304 KB
testcase_14 AC 385 ms
59,772 KB
testcase_15 AC 358 ms
60,000 KB
testcase_16 AC 369 ms
60,208 KB
testcase_17 AC 355 ms
59,592 KB
testcase_18 AC 391 ms
59,968 KB
testcase_19 AC 353 ms
60,032 KB
testcase_20 AC 259 ms
59,848 KB
testcase_21 AC 208 ms
58,728 KB
testcase_22 AC 488 ms
60,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;

class Main {
	public static void main(String[] args) throws Exception {
		new Main().run();
	}
	
	void run() {
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		BigInteger a=BigInteger.valueOf(10).pow(N);
		a=a.divide(BigInteger.valueOf(7));
		System.out.println(N==0?0:("0."+a));
	}
	
	static void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}
	
}
0