結果
問題 |
No.2415 偶数判定!Nafmoくん
|
ユーザー |
![]() |
提出日時 | 2025-03-18 16:16:20 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 340 bytes |
コンパイル時間 | 317 ms |
コンパイル使用メモリ | 25,088 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-18 16:16:22 |
合計ジャッジ時間 | 1,547 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%s",binaryNumberA); | ^~~~~~~~~~~~~~~~~~~~~~~~~ main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%s",binaryNumberB); | ^~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> void main(void) { char binaryNumberA[100] = "a"; scanf("%s",binaryNumberA); char binaryNumberB[100] = "B"; scanf("%s",binaryNumberB); if(binaryNumberA[(int)strlen(binaryNumberA)-1] != '1' || binaryNumberB[(int)strlen(binaryNumberB)-1] != '1'){ printf("Even"); }else{ printf("Odd"); } }