結果
問題 |
No.3023 Utility is Max?
|
ユーザー |
![]() |
提出日時 | 2025-03-20 21:19:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 657 bytes |
コンパイル時間 | 556 ms |
コンパイル使用メモリ | 66,500 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-20 21:20:41 |
合計ジャッジ時間 | 4,518 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }