結果
| 問題 | 
                            No.795 Restrictions!!!!!!!!!!!!!!
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-01-08 17:08:27 | 
| 言語 | Rust  (1.83.0 + proconio)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 744 bytes | 
| コンパイル時間 | 12,942 ms | 
| コンパイル使用メモリ | 392,812 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-23 02:55:10 | 
| 合計ジャッジ時間 | 13,811 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 20 | 
ソースコード
use std::io::Read;
fn solve(nm: Vec<&str>) {
    let coin100ok = nm[0].chars().last().unwrap().to_string().parse::<u8>().unwrap() % 2 == 0;
    let coin10ok  = nm[1].chars().last().unwrap().to_string().parse::<u8>().unwrap() % 2 == 0;
    if coin100ok {
        if coin10ok {
            println!("{}", "Yes");
        } else {
            println!("{}", "No");
        }
    } else {
        if nm[1].len() > 1 && coin10ok {
            println!("{}", "Yes");
        } else {
            println!("{}", "No");
        }
    }
}
fn main() {
    let mut nm = String::new();
    std::io::stdin().read_to_string(&mut nm).ok();
    let nm: Vec<&str> = nm.trim().split('\n').take(2)
        .map(|s| s.trim())
        .collect();
    solve(nm);
}