結果
| 問題 | No.1256 連続整数列 | 
| コンテスト | |
| ユーザー |  遭難者 | 
| 提出日時 | 2020-10-16 23:08:51 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                WA
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 423 bytes | 
| コンパイル時間 | 6,905 ms | 
| コンパイル使用メモリ | 83,408 KB | 
| 実行使用メモリ | 54,308 KB | 
| 最終ジャッジ日時 | 2024-07-21 01:29:08 | 
| 合計ジャッジ時間 | 7,571 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 WA * 3 | 
ソースコード
import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int a = Integer.parseInt(sc.next()) - 3;
		boolean s = true;
		for(int i = 3 ; s && a >= 0 ; i++){
			a -= i;
			if(a % i == 0){
				ou.println("YES");
				s = false;
			}
		}
		if(s) ou.println("NO");
		ou.flush();
		sc.close();
	}
}
            
            
            
        