結果

問題 No.53 悪の漸化式
ユーザー kohaku_kohaku
提出日時 2016-12-10 04:32:53
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 427 bytes
コンパイル時間 3,210 ms
コンパイル使用メモリ 75,200 KB
実行使用メモリ 41,688 KB
最終ジャッジ日時 2024-11-29 00:25:59
合計ジャッジ時間 6,832 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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