結果
問題 | No.2415 偶数判定!Nafmoくん |
ユーザー | suppy193 |
提出日時 | 2023-08-17 18:16:40 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 1,312 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 17:08:54 |
合計ジャッジ時間 | 1,546 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
コンパイルメッセージ
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); | ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main() { int i, j; char a[65], b[65]; 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; }