結果

問題 No.889 素数!
ユーザー snrnsidysnrnsidy
提出日時 2021-10-09 00:45:39
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 616 bytes
コンパイル時間 1,949 ms
コンパイル使用メモリ 199,592 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-30 15:32:04
合計ジャッジ時間 4,106 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 WA -
testcase_10 AC 1 ms
4,376 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 2 ms
4,380 KB
testcase_15 WA -
testcase_16 AC 1 ms
4,376 KB
testcase_17 WA -
testcase_18 AC 1 ms
4,380 KB
testcase_19 WA -
testcase_20 AC 1 ms
4,380 KB
testcase_21 WA -
testcase_22 AC 2 ms
4,376 KB
testcase_23 WA -
testcase_24 AC 2 ms
4,376 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 1 ms
4,380 KB
testcase_29 WA -
testcase_30 AC 1 ms
4,376 KB
testcase_31 WA -
testcase_32 AC 2 ms
4,380 KB
testcase_33 WA -
testcase_34 AC 2 ms
4,376 KB
testcase_35 WA -
testcase_36 AC 1 ms
4,376 KB
testcase_37 AC 2 ms
4,376 KB
testcase_38 WA -
testcase_39 AC 1 ms
4,380 KB
testcase_40 WA -
testcase_41 AC 2 ms
4,376 KB
testcase_42 WA -
testcase_43 AC 1 ms
4,380 KB
testcase_44 WA -
testcase_45 AC 2 ms
4,380 KB
testcase_46 WA -
testcase_47 AC 2 ms
4,380 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 2 ms
4,380 KB
testcase_52 WA -
testcase_53 AC 2 ms
4,380 KB
testcase_54 WA -
testcase_55 AC 1 ms
4,380 KB
testcase_56 WA -
testcase_57 AC 1 ms
4,380 KB
testcase_58 WA -
testcase_59 AC 2 ms
4,376 KB
testcase_60 WA -
testcase_61 AC 1 ms
4,376 KB
testcase_62 WA -
testcase_63 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

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

  int n;

  cin >> n;

  vector <int> prime = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61};

  for(int i=0;i<prime.size();i++)
  {
    if(n==prime[i])
    {
      cout << "Sosu!" << '\n';
      return 0;
    }
  }

  if(n >= 2 && n%2==0)
  {
    cout << "Heihosu!" << '\n';
    return 0;
  }

  if(n==8 || n==27)
  {
    cout << "Ripposu!" << '\n';
    return 0;
  }

  if(n==6 || n==28)
  {
    cout << "Kanzensu!" << '\n';
    return 0;
  }

  cout << n << '\n';
  
  return 0;
}
0