結果
問題 | No.44 DPなすごろく |
ユーザー |
![]() |
提出日時 | 2025-03-05 13:25:34 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 251 bytes |
コンパイル時間 | 380 ms |
コンパイル使用メモリ | 25,728 KB |
実行使用メモリ | 8,608 KB |
最終ジャッジ日時 | 2025-03-05 13:25:36 |
合計ジャッジ時間 | 1,593 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d", &N); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>#include <stdlib.h>int main(void) {int N;long long C[60]; // casescanf("%d", &N);C[0] = 1; C[1] = 1;for (int i = 2; i <= N; i++) {C[i] = C[i-2] + C[i-1];}printf("%lld\n", C[N]);}