結果
問題 | No.1256 連続整数列 |
ユーザー |
|
提出日時 | 2020-10-16 21:55:24 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,326 bytes |
コンパイル時間 | 1,028 ms |
コンパイル使用メモリ | 116,028 KB |
最終ジャッジ日時 | 2025-01-15 08:24:03 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 WA * 3 |
ソースコード
//(・ω・) #include <stdio.h> #include <iostream> // cout, endl, cin #include <string> // string, to_string, atoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <map> // map #include <queue> // queue, priority_queue #include <set> // set #include <stack> // stack #include <deque> // deque #include <unordered_map> // unordered_map #include <unordered_set> // unordered_set #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <math.h> #include <iomanip> //setprecision #include <limits> #include <sstream> //istringstream #include <stdlib.h> #include <list> #include <iterator>//std::advance() using namespace std; const double pi=3.141592653589793238; int main(){ long long a,b; bool ans=0; cin >> a; b=sqrt(a); for(int i=3; i<=b; i++){ if(i%2==1){ if(ans%i==0){ ans=1; break; } } else{ if(ans%i==(i/2)){ ans=1; break; } } } if(ans) cout << "YES" << endl; else cout << "NO" << endl; }