結果
| 問題 | No.8114 Prime Checker+1 |
| ユーザー |
|
| 提出日時 | 2025-02-22 16:22:20 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 555 bytes |
| 記録 | |
| コンパイル時間 | 1,821 ms |
| コンパイル使用メモリ | 333,640 KB |
| 実行使用メモリ | 9,280 KB |
| 最終ジャッジ日時 | 2026-07-05 06:25:51 |
| 合計ジャッジ時間 | 2,927 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long INF = 1LL << 60;
const int inf = 1073741823;
#define endl '\n'
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repa(i,n) for(int i=1;i<=(int)(n);i++)
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
string n;cin>>n;
if(n=="2"){
cout<<0<<endl;
cout<<"Yes"<<endl;
return 0;
}
int x=int(n[ssize(n)-1]-'0');
if(x==0||x==2||x==4||x==6||x==8){
cout<<0<<endl;
cout<<"No"<<endl;
}
else{
cout<<1<<endl;
cout<<"No"<<endl;
}
return 0;
}