Submission #00041


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<stdio.h>
int main(){
long long n,a,ok=1;
scanf("%lld",&n);
for(long long i=0;i<n;i++){
scanf("%lld",&a);
for(long long j=2;j*j<=a && ok==1;j++){
if(a%j==0){
ok=0;
}
}
if(ok==1&&a!=1){
printf("Good\n");
}else{
printf("Bad\n");
}
ok=1;
}
return(0);
}

ステータス

項目 データ
問題 0010 - 大きな素数
ユーザー名 DAI_0110
投稿日時 2024-05-30 16:30:04
言語 C
状態 Accepted
得点 10
ソースコード長 416 Byte
最大実行時間 28 ms
最大メモリ使用量 460 KB

セット

セット 得点 Cases
1 ALL 4 / 4 *
2 部分点1 6 / 6 insmall*

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in1.txt AC 28 ms 376 KB
1
in2.txt AC 20 ms 272 KB
1
in3.txt AC 19 ms 324 KB
1
in4.txt AC 21 ms 380 KB
1
in5.txt AC 27 ms 460 KB
1
insample1.txt AC 22 ms 392 KB
1
insmall1.txt AC 16 ms 408 KB
1
2
insmall2.txt AC 22 ms 244 KB
1
2