結果
| 問題 | No.129 お年玉(2) |
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2017-01-02 12:59:48 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 177 ms / 5,000 ms |
| コード長 | 212 bytes |
| 記録 | |
| コンパイル時間 | 192 ms |
| コンパイル使用メモリ | 40,448 KB |
| 最終ジャッジ日時 | 2026-02-24 00:02:36 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 46 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | C[10001][10001];
| ^
main.c:3:1: warning: data definition has no type or storage class
3 | i,j,k;
| ^
main.c: In function 'main':
main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
5 | scanf("%lld%d",&N,&M);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | C[10001][10001];
main.c:10:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
10 | printf("%d\n",C[M][k]);
| ^~~~~~
main.c:10:9: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
C[10001][10001];
long long N;
i,j,k;
main(M){
scanf("%lld%d",&N,&M);
k=N/1000%M;
for(;i<=M;++i)
for(C[i][0]=j=1;j<=i;++j)
C[i][j]=(C[i-1][j-1]+C[i-1][j])%1000000000;
printf("%d\n",C[M][k]);
return 0;
}
%20