結果
| 問題 | No.680 作れる数 | 
| コンテスト | |
| ユーザー |  vjudge1 | 
| 提出日時 | 2025-09-20 18:39:01 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 587 bytes | 
| コンパイル時間 | 1,160 ms | 
| コンパイル使用メモリ | 155,724 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-09-20 18:39:04 | 
| 合計ジャッジ時間 | 2,339 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 20 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
signed main()
{
    // freopen("gen.in", "r", stdin);
    // freopen("gen.out", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int T=1;
    while (T--)
    {
        int n;
        cin >> n;
        bool f = 1;
        for (int i = 30; i >= 0; i--)
        {
            if (i == __builtin_popcount(n + i))
            {
                puts("YES");
                f = 0;
                break;
            }
        }
        if (f)
            puts("NO");
    }
}
            
            
            
        