結果

問題 No.1256 連続整数列
ユーザー 57tggx
提出日時 2020-10-16 21:32:26
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 269 bytes
コンパイル時間 539 ms
コンパイル使用メモリ 66,860 KB
最終ジャッジ日時 2025-01-15 08:08:37
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0