結果
問題 |
No.44 DPなすごろく
|
ユーザー |
![]() |
提出日時 | 2015-07-26 22:00:05 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 214 bytes |
コンパイル時間 | 522 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-16 00:17:48 |
合計ジャッジ時間 | 1,099 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d",&N); | ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<stdlib.h> typedef long long int ln; int main(void){ int N; scanf("%d",&N); ln a,b; a=1; b=1; while(N>1){ ln c=a+b; a=b; b=c; N--; } printf("%lld\n",b); return 0; }