結果

問題 No.166 マス埋めゲーム
ユーザー jin128
提出日時 2016-08-30 19:17:18
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 20,352 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-14 07:53:13
合計ジャッジ時間 885 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |   scanf("%d%d%ld%ld", &h,&w,&n,&k);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
  int w, h;
  long int n, k;
  long int end;

  scanf("%d%d%ld%ld", &h,&w,&n,&k);
  end = w * h % n;
  if(end == 0) end = n;

  if(k == end){
      printf("YES\n");
  }else{
      printf("NO\n");
  }
  return 0;
}
0