結果

問題 No.1058 素敵な数
ユーザー コーヒー太郎コーヒー太郎
提出日時 2020-05-23 09:30:30
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 456 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 29,952 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-16 10:15:16
合計ジャッジ時間 737 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<stdio.h>

int main(void){
    int N, a = 100001, b;
    
    scanf("%d", &N);
    
    if(N == 1){
        printf("1");
    }else{
        while(N != 0){
            for(int i = 2; i <= 350; i++){
                if(a % i == 0) break;
                if(i == 350){
                    N--;
                    if(N - 1 == 0) b = a;
                }
            }
            a += 2;
        }
        printf("%d", a*b);
    }
    
    return 0;
}
0