結果
| 問題 | 
                            No.889 素数!
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-04-10 17:04:44 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 678 bytes | 
| コンパイル時間 | 1,061 ms | 
| コンパイル使用メモリ | 83,124 KB | 
| 最終ジャッジ日時 | 2025-01-09 15:41:44 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 60 WA * 1 | 
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <set>
const std::vector<std::set<int>>
    xss{{2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61},
        {1, 4, 9, 16, 25, 36, 49},
        {1, 8, 27},
        {6, 28}};
const std::vector<std::string>
    ss{"So", "Heiho", "Rippo", "Kanzen"};
void solve() {
    int n;
    std::cin >> n;
    for (int i = 0; i < 4; ++i) {
        if (xss[i].count(n)) {
            std::cout << ss[i] << "su!" << std::endl;
            return;
        }
    }
    std::cout << n << std::endl;
}
int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    solve();
    return 0;
}