結果

問題 No.786 京都大学の過去問
ユーザー komugikomugi
提出日時 2019-02-17 00:38:13
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 273 bytes
コンパイル時間 819 ms
コンパイル使用メモリ 29,020 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-25 07:28:34
合計ジャッジ時間 857 ms
ジャッジサーバーID
(参考情報)
judge12 / 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(){
    int a,i,j,ans=0,bufa=1,bufb=1;
    scanf("%d",&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("%d\n",ans+1);
}
0