結果

問題 No.786 京都大学の過去問
ユーザー komugikomugi
提出日時 2019-02-17 00:42:02
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 749 ms
コンパイル使用メモリ 29,056 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-25 07:37:39
合計ジャッジ時間 1,191 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(){
    long int a,i,j,ans=0,bufa=1,bufb=1;
    scanf("%ld",&a);
    for(i=1;i<=a/2;i++){
      bufa=1;
      bufb=1;
        for(j=0;j<i;j++)bufa*=(a-i-j);
        for(j=i;j>0;j--)bufb*=j;
        ans+=bufa/bufb;
    }    
    printf("%ld\n",ans+1);
}
0