結果
| 問題 | No.554 recurrence formula |
| コンテスト | |
| ユーザー |
aaaaasatori
|
| 提出日時 | 2018-02-24 18:33:49 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 388 bytes |
| 記録 | |
| コンパイル時間 | 3,255 ms |
| コンパイル使用メモリ | 81,520 KB |
| 実行使用メモリ | 58,716 KB |
| 最終ジャッジ日時 | 2026-05-02 21:00:36 |
| 合計ジャッジ時間 | 10,372 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 18 TLE * 1 -- * 1 |
ソースコード
import java.util.Scanner;
public class No554 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final long mod = 1000000007;
int n = sc.nextInt();
long a[] = new long[n+1];
a[0] = 0;
a[1] = 1;
for(int i = 2;i <= n;i++) {
for(int j = 1;j < i;j += 2) {
a[i] += i * a[i-j] % mod;
}
a[i] %= mod;
System.out.println(a[i]);
}
}
}
aaaaasatori