結果

問題 No.2415 偶数判定!Nafmoくん
ユーザー suppy193
提出日時 2023-08-17 12:23:24
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 205 ms
コンパイル使用メモリ 20,352 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-26 08:53:55
合計ジャッジ時間 856 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf("%s", a);
      |         ^~~~~~~~~~~~~~
main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         scanf("%s", b);
      |         ^~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main()
{
	int i, j;
	char a[64], b[64];
	
	scanf("%s", a);
	scanf("%s", b);
	
	i = 0;
	while(a[i] != '\0'){
		i++;	
	}
	
	j = 0;
	while(b[j] != '\0'){
		j++;	
	}
	
	//printf("%d %d\n", i, j);

	if(a[i - 1] == '1' && b[j - 1] == '1'){
		printf("Odd\n");
	}
	else{
		printf("Even\n");
	}
	
	
	return 0;
}
0