結果
問題 | No.384 マス埋めゲーム2 |
ユーザー |
|
提出日時 | 2016-07-07 21:32:28 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 288 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 23:22:03 |
合計ジャッジ時間 | 1,047 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%lf %lf %lf %lf", &h, &w, &n, &k); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(void){int c;double h, w, n, k;scanf("%lf %lf %lf %lf", &h, &w, &n, &k);c = (int)(h + w - 1) % (int)n;if(c == k)printf("YES\n");else if(c == 0){if(n == k)printf("YES\n");elseprintf("NO\n");}elseprintf("NO\n");return 0;}