結果
問題 |
No.8114 Prime Checker+1
|
ユーザー |
|
提出日時 | 2025-02-22 01:04:33 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 3,418 ms |
コンパイル使用メモリ | 273,472 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-02-22 01:04:39 |
合計ジャッジ時間 | 4,662 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
#include "bits/stdc++.h" using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string s; cin >> s; if (s.size() == 1 && s[0] == '2') { cout << "0" << "\n"; cout << "Yes" << "\n"; } else { if ((s[s.size() - 1]- '0') % 2 == 0) { cout << "0" << "\n"; cout << "No" << "\n"; } else { cout << "1" << "\n"; cout << "No" << "\n"; } } return 0; }