結果
問題 | No.889 素数! |
ユーザー |
![]() |
提出日時 | 2019-09-20 21:29:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 629 bytes |
コンパイル時間 | 1,797 ms |
コンパイル使用メモリ | 178,056 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 16:25:35 |
合計ジャッジ時間 | 3,421 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 100000000 int main(){ map<string,vector<int>> mp; mp["Sosu!"]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61}; mp["Heihosu!"]={4,9,16,25,36,49,64}; mp["Ripposu!"] = {8,27,64}; mp["Kanzensu!"]={6,28}; int N; cin>>N; string ans = ""; for(auto a:mp){ for(int i=0;i<a.second.size();i++){ if(a.second[i]==N){ if(ans=="")ans=a.first; else{ cout<<N<<endl; return 0; } } } } if(ans=="")cout<<N<<endl; else cout<<ans<<endl; return 0; }