結果
| 問題 |
No.889 素数!
|
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-02-24 18:06:02 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 677 bytes |
| コンパイル時間 | 1,505 ms |
| コンパイル使用メモリ | 167,660 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 06:43:31 |
| 合計ジャッジ時間 | 3,038 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 61 |
ソースコード
#include <bits/stdc++.h>
using longlong=long long;
int main(){
std::cin.tie(nullptr);std::cin.sync_with_stdio(false);
int n;std::cin>>n;
for(int i=2;i<8;i++){
if(i*i==n){
std::cout<<"Heihosu!"<<std::endl;
return 0;
}
}
for(int i=2;i<4;i++){
if(i*i*i==n){
std::cout<<"Ripposu!"<<std::endl;
return 0;
}
}
int l=0;
for(int i=1;i<n;i++){
if(n%i==0)l+=i;
}
if(2<=n&&l==n){
std::cout<<"Kanzensu!"<<std::endl;
return 0;
}
if(2<=n&&l==1){
std::cout<<"Sosu!"<<std::endl;
return 0;
}
std::cout<<n<<std::endl;
}
ngtkana