結果
問題 |
No.1256 連続整数列
|
ユーザー |
![]() |
提出日時 | 2020-10-16 21:47:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 411 ms |
コンパイル使用メモリ | 63,104 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-21 01:21:15 |
合計ジャッジ時間 | 1,102 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 23 |
ソースコード
#include <iostream> int main(){ int n; bool ans = true; std::cin >> n; int i = 3; int j = 3; while(j <= n){ j += i; // ここで確認 if((n - j) % i == 0){ std::cout << "NO" << std::endl; return 0; } ++i; } std::cout << "YES" << std::endl; }