結果
問題 | No.3023 Utility is Max? |
ユーザー |
![]() |
提出日時 | 2025-03-20 18:59:52 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 657 bytes |
コンパイル時間 | 489 ms |
コンパイル使用メモリ | 66,568 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-20 19:00:31 |
合計ジャッジ時間 | 3,920 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 17 |
ソースコード
#include <iostream>using namespace std;int main() {int N;cin >> N;int t = true;int f = false;int two = t << t;if (N <= t) {cout << "NO\n";return f;}if (N == two) {cout << "YES\n";return f;}if (N % two == f) {cout << "NO\n";return f;}int current_i = two | t;int square = current_i * current_i;while (square > f && square <= N) {if (N % current_i == f) {cout << "NO\n";return f;}current_i += two;square = current_i * current_i;}cout << "YES\n";return f;}