結果

問題 No.889 素数!
ユーザー CELICA
提出日時 2020-07-17 20:24:03
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 1,800 ms
コンパイル使用メモリ 170,824 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-29 16:47:15
合計ジャッジ時間 3,618 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 61
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    scanf("%d", &n);

    set<int> s{2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61},h{4,9,16,25,36,49},r{8,27},k{6,28};

    if (s.count(n))
        printf("Sosu!\n");
    else if(h.count(n))
        printf("Heihosu!\n");
    else if(r.count(n))
        printf("Ripposu!\n");
    else if(k.count(n))
        printf("Kanzensu!\n");
    else
        printf("%d\n",n);

    return 0;
}
0