結果

問題 No.3108 Luke or Bishop
ユーザー pengin_2000
提出日時 2025-04-18 20:28:52
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 24,448 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2025-04-18 20:28:54
合計ジャッジ時間 1,217 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%d %d", &x, &y);
      |         ^~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
int main()
{
	int x, y;
	scanf("%d %d", &x, &y);
	if (x == 0 && y == 0)
		printf("0\n");
	else if (x == 0 || y == 0 || x == y || x + y == 0)
		printf("1\n");
	else
		printf("2\n");
	return 0;
}
0