結果
| 問題 | 
                            No.889 素数!
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ゆきのん
                         | 
                    
| 提出日時 | 2019-09-20 21:53:27 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,039 bytes | 
| コンパイル時間 | 1,268 ms | 
| コンパイル使用メモリ | 157,784 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-14 17:19:20 | 
| 合計ジャッジ時間 | 2,941 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 58 WA * 3 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long LL;
typedef pair<int,int> P;
const LL mod=1000000007;
const LL LINF=1LL<<60;
const int INF=1<<30;
int a[]={4,16,25,36,49};
int b[]={8,27};
int c[]={6,28};
int main(){
    int n;cin >> n;
    bool f = true;
    for (int i = 2; i < n; i++) {
        if(n%i==0) f = false;
    }
    if(f) puts("Sosu!");
    else{
        for (int i = 0; i < 5; i++) {
            if(n==a[i]){
                puts("Heihosu!");
                return 0;
            }
        }
        for (int i = 0; i < 2; i++) {
            if(n==b[i]){
                puts("Ripposu!");
                return 0;
            }
        }
        for (int i = 0; i < 2; i++) {
            if(n==c[i]){
                puts("Kanzensu!");
                return 0;
            }
        }
        cout << n << endl;
    }
    return 0;
}
            
            
            
        
            
ゆきのん