結果
| 問題 | 
                            No.129 お年玉(2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             %20
                         | 
                    
| 提出日時 | 2017-01-02 12:59:48 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 231 ms / 5,000 ms | 
| コード長 | 212 bytes | 
| コンパイル時間 | 340 ms | 
| コンパイル使用メモリ | 20,352 KB | 
| 実行使用メモリ | 262,716 KB | 
| 最終ジャッジ日時 | 2024-11-28 00:37:04 | 
| 合計ジャッジ時間 | 6,404 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / 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:1:1: warning: type defaults to ‘int’ in declaration of ‘C’ [-Wimplicit-int]
main.c:3:1: warning: data definition has no type or storage class
    3 | i,j,k;
      | ^
main.c:3:1: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
main.c:3:3: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int]
    3 | i,j,k;
      |   ^
main.c:3:5: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int]
    3 | i,j,k;
      |     ^
main.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    4 | main(M){
      | ^~~~
main.c: In function ‘main’:
main.c:4:1: warning: type of ‘M’ defaults to ‘int’ [-Wimplicit-int]
main.c:5:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
    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:5:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    5 |         scanf("%lld%d",&N,&M);
      |         ^~~~~
main.c:5:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:10:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
   10 |         printf("%d\n",C[M][k]);
      |         ^~~~~~
main.c:10:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:10:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
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