結果
| 問題 | 
                            No.795 Restrictions!!!!!!!!!!!!!!
                             | 
                    
| コンテスト | |
| ユーザー | 
                             michonz4
                         | 
                    
| 提出日時 | 2019-12-04 21:24:51 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 396 bytes | 
| コンパイル時間 | 381 ms | 
| コンパイル使用メモリ | 23,040 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-12-14 10:39:19 | 
| 合計ジャッジ時間 | 3,974 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | RE * 20 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |   scanf("%s %s", n, m);
      |   ~~~~~^~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <string.h>
int main() {
  char n[256], m[256];
  scanf("%s %s", n, m);
  
  int sizeN=strlen(n), sizeM=strlen(m);
  if ((n[sizeN-1]-'0')%2==0) {
    if ((m[sizeM-1]-'0')%2==0) {
      printf("Yes\n");
    } else ("No\n");
  } else {
    if ((m[sizeM-1])%2==0 && m[sizeM-2]-'0'>=1) {
      printf("Yes\n");
    } else {
      printf("No\n");
    }
  }
  
  return 0;
}
            
            
            
        
            
michonz4