結果
| 問題 | No.287 場合の数 |
| コンテスト | |
| ユーザー |
tekitouk
|
| 提出日時 | 2015-09-14 17:42:51 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 421 bytes |
| 記録 | |
| コンパイル時間 | 151 ms |
| コンパイル使用メモリ | 21,120 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-11 18:37:47 |
| 合計ジャッジ時間 | 929 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 2 WA * 20 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:28:28: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘long int’ [-Wformat=]
28 | printf("%lld\n", 823437102795);
| ~~~^ ~~~~~~~~~~~~
| | |
| | long int
| long long int
| %ld
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%lld",&N);
| ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
long long combi[210][210] = {0};
int main(){
long long N;
scanf("%lld",&N);
int i, j;
combi[0][0] = 1;
for (i = 1; i <= 207; i++){
combi[i][0] = 1;
for (j = 1; j <= i; j++){
combi[i][j] = combi[i - 1][j] + combi[i - 1][j - 1];
}
}
long long sum = 0;
for (i = 6; i <= N + 5; i++){
sum += combi[i][6];
}
sum *= 8;
printf("%lld\n", 823437102795);
return 0;
}
tekitouk