結果

問題 No.53 悪の漸化式
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-12-10 04:32:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 427 bytes
コンパイル時間 4,114 ms
コンパイル使用メモリ 71,956 KB
実行使用メモリ 40,384 KB
最終ジャッジ日時 2023-08-19 09:13:11
合計ジャッジ時間 7,821 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
39,976 KB
testcase_01 AC 111 ms
39,576 KB
testcase_02 AC 111 ms
39,516 KB
testcase_03 AC 111 ms
39,304 KB
testcase_04 AC 113 ms
39,432 KB
testcase_05 AC 114 ms
40,312 KB
testcase_06 AC 108 ms
40,384 KB
testcase_07 AC 110 ms
39,560 KB
testcase_08 AC 112 ms
39,756 KB
testcase_09 AC 115 ms
39,640 KB
testcase_10 AC 114 ms
39,996 KB
testcase_11 AC 112 ms
39,528 KB
testcase_12 AC 112 ms
39,376 KB
testcase_13 AC 109 ms
40,076 KB
testcase_14 AC 111 ms
39,784 KB
testcase_15 AC 112 ms
39,620 KB
testcase_16 AC 110 ms
39,584 KB
testcase_17 AC 112 ms
39,396 KB
testcase_18 AC 114 ms
39,920 KB
testcase_19 AC 115 ms
39,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        BigDecimal An = new BigDecimal("4");
        BigDecimal t = new BigDecimal("0.75");
        for(int i=0; i<N; i++){
            An=An.multiply(t);
        }
        String ans = An.toPlainString();
        System.out.println(ans);
    }
}
0