結果

問題 No.1543 [Cherry 2nd Tune A] これがプログラミングなのね
ユーザー seinyan
提出日時 2021-11-02 21:20:12
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 608 bytes
コンパイル時間 12,621 ms
コンパイル使用メモリ 403,772 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-12 03:24:46
合計ジャッジ時間 13,907 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io;
fn main() {
    let v = input_strings();

    let s = v[0].parse::<i32>().unwrap();
    let t = v[1].parse::<i32>().unwrap();
    let result: bool;
    let c: &str = &v[2];
    match c {
        "<" => result = s < t,
        ">" => result = s > t,
        "=" => result = s == t,
        _ => result = false,
    }
    println!("{}", if result { "Yes" } else { "No" });
}
fn input_strings() -> Vec<String> {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    let mut v = Vec::new();
    for n in s.split_whitespace() {
        v.push(String::from(n));
    }
    v
}
0