結果
問題 | No.889 素数! |
ユーザー |
|
提出日時 | 2021-10-09 00:46:35 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 646 bytes |
コンパイル時間 | 2,213 ms |
コンパイル使用メモリ | 192,532 KB |
最終ジャッジ日時 | 2025-01-24 23:42:45 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
ソースコード
#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==4 || n==9 || n==16 || n==25 || n==36 || n==49) { 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; }