結果

問題 No.889 素数!
ユーザー snrnsidysnrnsidy
提出日時 2021-10-09 00:45:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 616 bytes
コンパイル時間 2,608 ms
コンパイル使用メモリ 192,780 KB
最終ジャッジ日時 2025-01-24 23:42:26
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 WA * 30
権限があれば一括ダウンロードができます

ソースコード

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