結果
| 問題 | No.44 DPなすごろく |
| ユーザー |
hhgfhn1
|
| 提出日時 | 2018-10-18 10:20:30 |
| 言語 | Java (openjdk 27 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 377 bytes |
| 記録 | |
| コンパイル時間 | 1,469 ms |
| コンパイル使用メモリ | 85,620 KB |
| 実行使用メモリ | 43,364 KB |
| 最終ジャッジ日時 | 2026-09-17 10:31:48 |
| 合計ジャッジ時間 | 12,479 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | AC * 14 TLE * 1 -- * 5 |
ソースコード
import java.util.Scanner;
public class Main {
@SuppressWarnings("resource")
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
dfs(0,n);
System.out.println(cnt);
}
static long cnt=0;
private static void dfs(int i,int n) {
if(i>=n){
if(i==n)cnt++;
return;
}
dfs(i+1,n);
dfs(i+2,n);
}
}
hhgfhn1