結果
問題 | No.85 TVザッピング(1) |
ユーザー |
![]() |
提出日時 | 2015-07-13 04:02:08 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 353 bytes |
コンパイル時間 | 150 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-04 17:31:53 |
合計ジャッジ時間 | 903 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:12:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%d %d %d", &n, &m, &c); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int min(int a, int b){if(a < b){return a;}return b;}int main(void){int flag;int n,m,c;scanf("%d %d %d", &n, &m, &c);if(n*m == 2){flag =1;}else if(min(n,m) < 2){flag = 0;}else if( (n*m)%2 == 0){flag = 1;}else{flag = 0;}if(flag){printf("YES\n");}else{printf("NO\n");}return 0;}