結果
問題 | No.889 素数! |
ユーザー |
|
提出日時 | 2019-09-20 22:07:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 533 bytes |
コンパイル時間 | 1,782 ms |
コンパイル使用メモリ | 166,480 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 17:47:47 |
合計ジャッジ時間 | 3,707 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
ソースコード
#include <bits/stdc++.h>using namespace std;string a[4] = {"Sosu!", "Heihosu!", "Ripposu!", "Kanzensu!"};int p[28] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 4, 9, 16, 25, 36, 49, 8, 27, 6, 28};int q[28] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3};int main() {int n; cin >> n;for (int i = 0; i < 28; i++) {if (p[i] == n) {cout << a[q[i]] << endl;return 0;}}cout << n << endl;return 0;}