結果
問題 | No.85 TVザッピング(1) |
ユーザー |
![]() |
提出日時 | 2016-06-16 13:02:15 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 226 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-04 17:57:17 |
合計ジャッジ時間 | 856 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:4:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%d %d %d",&N,&M,&C); | ^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(){int N,M,C;scanf("%d %d %d",&N,&M,&C);if((N==1 && M==2)||(N==2 && M==1))printf("YES\n");else if(N!=1 && M!=1 && (N%2==0 || M%2==0))printf("YES\n");else printf("NO\n");return 0;}