結果

問題 No.53 悪の漸化式
ユーザー リチウムリチウム
提出日時 2014-10-30 23:23:56
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 4,566 ms
コンパイル使用メモリ 72,312 KB
実行使用メモリ 56,160 KB
最終ジャッジ日時 2023-08-28 23:30:12
合計ジャッジ時間 5,380 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,892 KB
testcase_01 AC 125 ms
55,852 KB
testcase_02 AC 122 ms
55,676 KB
testcase_03 AC 125 ms
55,744 KB
testcase_04 AC 123 ms
55,652 KB
testcase_05 AC 121 ms
55,476 KB
testcase_06 AC 127 ms
55,812 KB
testcase_07 AC 122 ms
55,756 KB
testcase_08 AC 125 ms
55,844 KB
testcase_09 AC 123 ms
55,872 KB
testcase_10 AC 125 ms
55,824 KB
testcase_11 AC 125 ms
55,592 KB
testcase_12 AC 123 ms
55,488 KB
testcase_13 AC 125 ms
56,160 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		double a[]=new double[105];
		a[0]=4;
		a[1]=3;
		for(int i=2;i<105;i++){
			a[i]=(a[i-1]*19-a[i-2]*12)/4;
		}
	System.out.println(a[n]);
		
	}}
0