UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#213037#3823. 艾特扣德181126062310269ms9008kbC++11345b2024-11-03 12:54:322024-11-03 13:02:51

answer

#include<bits/stdc++.h>
#define int long long
#define MOD 998244353
using namespace std;
int t,n,a[1000001];
signed main(){
    a[0]=1;
    for(int i=1;i<=1000000;i++)
    {
        a[i]=a[i-1]*i%MOD;
    }
    scanf("%lld",&t);
    while(t--)
    {
        scanf("%lld",&n);
        printf("%lld\n",a[n-1]);
    }
	return 0;
}

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 9004kb

input:

100
4 4
3 0 1 2
3 1
0
5 2
1 3
5 3
1 4 2
5 3
0 4 2
3 1
0
5 1
3
3 3
1 2 0
3 1
0
4 3
0 2 3
4 2
0 2
5 1
...

output:

6
6
2
0
1
1
2
1
0
24
1
1
2
24
2
1
6
1
24
2
0
6
1
2
1
0
24
1
2
2
2
1
1
0
2
1
0
6
2
0
1
2
6
1
0
1
24
1...

result:

wrong answer 1st lines differ - expected: '1', found: '6'

Test #2:

score: 0
Wrong Answer
time: 241ms
memory: 9004kb

input:

1000000
420929 1
239064
93187 1
85123
171379 1
110159
658643 1
0
303046 1
95912
800861 1
781035
9893...

output:

400329762
1
362687632
559687374
1
9873390
586922490
1
923932968
601898094
1
0
35921198
1
356756382
4...

result:

wrong answer 1st lines differ - expected: '598226497', found: '400329762'

Test #3:

score: 0
Wrong Answer
time: 7ms
memory: 9008kb

input:

38765
832568 1
0
992725 6
548209 466528 628957 748938 0 578853
943934 15
863133 363066 513728 634152...

output:

272326978
1
0
350796225
120
63221972
854181959
34197949
707992756
0
442226209
915197180
331032489
51...

result:

wrong answer 1st lines differ - expected: '485766967', found: '272326978'

Test #4:

score: 0
Wrong Answer
time: 14ms
memory: 9008kb

input:

38573
988634 10
800634 876452 811249 495916 842656 695203 0 914758 757887 237251
948749 6
282623 267...

output:

898161535
362880
590009663
973780875
237122001
472598371
444015953
804622832
0
544013361
608166249
9...

result:

wrong answer 1st lines differ - expected: '184333188', found: '898161535'

Test #5:

score: 0
Wrong Answer
time: 7ms
memory: 9008kb

input:

38561
996249 6
150367 424546 851150 536915 420708 392670
956743 7
858128 296060 304111 814957 936254...

output:

734339261
120
965693729
900333465
990086836
919739042
609691246
992337411
891282115
720
52517964
865...

result:

wrong answer 1st lines differ - expected: '204801326', found: '734339261'