結果

問題 No.166 マス埋めゲーム
ユーザー furafy
提出日時 2015-04-18 22:41:41
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 40,192 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-04 16:27:13
合計ジャッジ時間 942 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:15: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         fscanf(stdin, "%f %f %f %f", &H, &W, &N, &K);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <cmath>
#include <vector>
using namespace std;

int main(){
	using std::vector;
	float H, W, N, K;
	float size;
	fscanf(stdin, "%f %f %f %f", &H, &W, &N, &K);
	size = (H * W) - 1;
	size = fmod(size, N);
	if ((int)size == (int)(K-1)) {
		printf("YES\n");
	}
	else {
		printf("NO\n");
	}
	return 0;
}
0