結果
| 問題 | No.8114 Prime Checker+1 |
| ユーザー |
|
| 提出日時 | 2025-12-17 18:09:07 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 575 bytes |
| 記録 | |
| コンパイル時間 | 3,393 ms |
| コンパイル使用メモリ | 275,628 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-12-17 18:09:13 |
| 合計ジャッジ時間 | 4,730 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define INFL (ll)3e18
#define INF (int)1e9
#define MOD 998244353
#define MODO (ll)1e9+7
using namespace std;
int main(void){
ios::sync_with_stdio(false);
cin.tie(nullptr);
string n;
cin >> n;
int l = n.size();
if((n[l-1]-'0')%2 == 0){
cout << 0 << endl;
if(n == "2") cout << "Yes" << endl;
else cout << "No" << endl;
}
else{
cout << 1 << endl;
if(n == "1") cout << "Yes" << endl;
else cout << "No" << endl;
}
}