結果

問題 No.1064 ∪∩∩ / Cup Cap Cap
ユーザー Strorkis
提出日時 2020-05-29 21:49:00
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 685 bytes
コンパイル時間 11,994 ms
コンパイル使用メモリ 400,536 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-06 03:44:41
合計ジャッジ時間 13,401 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 35 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();
    let mut iter = buf.split_whitespace();

    let a: i32 = iter.next().unwrap().parse().unwrap();
    let b: i32 = iter.next().unwrap().parse().unwrap();
    let c: i32 = iter.next().unwrap().parse().unwrap();
    let d: i32 = iter.next().unwrap().parse().unwrap();

    let disc: i32 = (a - c) * (a - c) - 8 *  (b - d);

    if disc < 0 {
        println!("No");
    } else if disc == 0 {
        println!("Yes");
    } else {
        let p: f32 = (a + c) as f32 / 2.0;
        let q: f32 = (b + d) as f32 / 2.0;
        println!("{:.10} {:.10}", p, q);
    }
}
0