結果

問題 No.1256 連続整数列
ユーザー nawawan
提出日時 2020-10-17 01:17:48
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 383 bytes
コンパイル時間 483 ms
コンパイル使用メモリ 66,176 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-21 01:36:56
合計ジャッジ時間 1,209 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int A;
    cin >> A;
    A *= 2;
    for(int i = 2; i * i <= A; i++){
        if(A % (i + 1) == 0 && A / (i + 1) - i > 0 && (A / (i + 1) - i) % 2 == 0){
            cout << "YES" << endl;
            return 0;
        }
    }
    cout << "NO" << endl;
}
0