結果

問題 No.1327 グラフの数え上げ
ユーザー testestesttestestest
提出日時 2020-08-14 19:53:21
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 333 bytes
コンパイル時間 1,308 ms
コンパイル使用メモリ 29,952 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-19 18:07:44
合計ジャッジ時間 2,324 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 1 ms
6,940 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 1 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<string.h>
int main(){
    
    char s[20];
    scanf("%15s",s);
    if(strlen(s)>13)return 0&puts("0");

    const int MOD=1e9+7;
    long long n;
    scanf("%lld",&n);
    if(n>MOD)return 0&puts("0");
    
    long long ans=1;
    for(int i=1;i<n;i++)ans=ans*i%MOD;
    printf("%lld\n",n%2?ans:MOD-ans);
}
0