結果

問題 No.166 マス埋めゲーム
ユーザー k_kadora
提出日時 2015-05-27 14:29:54
言語 Java
(openjdk 23)
結果
AC  
実行時間 121 ms / 1,000 ms
コード長 372 bytes
コンパイル時間 3,553 ms
コンパイル使用メモリ 75,044 KB
実行使用メモリ 54,280 KB
最終ジャッジ日時 2024-07-06 10:53:46
合計ジャッジ時間 7,466 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Masu {
	public static void main(String[] arg){
		Scanner sc = new Scanner(System.in);
		long h,w,n,k,sum,ch;
		h = sc.nextLong();
		w = sc.nextLong();
		n = sc.nextLong();
		k = sc.nextLong();
		sum = h*w;
		ch = sum % n;
		if((k == ch) || (k == n && ch == 0)){
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
	}
}
0