結果
| 問題 | No.44 DPなすごろく |
| ユーザー |
kiridaruma
|
| 提出日時 | 2016-05-16 22:47:19 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 508 ms |
| コンパイル使用メモリ | 74,176 KB |
| 実行使用メモリ | 10,020 KB |
| 最終ジャッジ日時 | 2026-03-05 07:00:22 |
| 合計ジャッジ時間 | 17,298 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 TLE * 1 |
| other | AC * 19 TLE * 1 |
ソースコード
import std.stdio, std.string, std.conv;
int n;
ulong[] arr;
void main(){
n = readln.strip.to!int;
arr.length = n+1;
hoge(0);
arr[n].writeln;
}
void hoge(int num){
if(num < n-1){
arr[num + 2]++;
hoge(num + 2);
}
if(num < n){
arr[num + 1]++;
hoge(num + 1);
}
}
kiridaruma