結果

問題 No.889 素数!
ユーザー trineutron
提出日時 2019-07-30 05:21:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 849 bytes
コンパイル時間 1,463 ms
コンパイル使用メモリ 166,340 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-07 02:23:24
合計ジャッジ時間 3,101 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 35 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    switch (n) {
        case 2:
        case 3:
        case 5:
        case 7:
        case 11:
        case 13:
        case 17:
        case 23:
        case 29:
        case 31:
        case 37:
        case 41:
        case 43:
        case 47:
        case 53:
        case 59:
        case 61:
            cout << "素数!" << endl;
            break;
        case 4:
        case 9:
        case 16:
        case 25:
        case 36:
        case 49:
            cout << "平方数!" << endl;
            break;
        case 8:
        case 27:
            cout << "立方数!" << endl;
            break;
        case 6:
        case 28:
            cout << "完全数!" << endl;
            break;
        default:
            cout << n << endl;
    }
}
0