Submission #6758293


Source Code Expand

use std::thread;

/// ローカル環境なら _in.txt から入力を受ける
fn read_input() -> String {
    use std::fs::File;
    use std::io::Read;
    let mut s = String::new();
    match option_env!("LOCAL") {
        Some(_) => File::open("src/_in.txt")
            .expect("File not found")
            .read_to_string(&mut s)
            .unwrap(),
        None => std::io::stdin().read_to_string(&mut s).unwrap(),
    };
    s
}

fn main() {
    thread::Builder::new()
        .stack_size(32 * 1024 * 1024) // 32MB
        .spawn(run)
        .unwrap()
        .join()
        .unwrap();
}

fn run() {
    let input = read_input();
    let mut input = input.split_whitespace();

    let a: f64 = input.next().unwrap().parse().unwrap();
    let b: f64 = input.next().unwrap().parse().unwrap();
    let c: f64 = input.next().unwrap().parse().unwrap();
    println!("{:?}", c / a * b);
}

Submission Info

Submission Time
Task A - SDカード
User nohtaray
Language Rust (1.15.1)
Score 100
Code Size 932 Byte
Status AC
Exec Time 3 ms
Memory 8572 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 10
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt
All 00_example_01.txt, 00_example_02.txt, 10_rand_01.txt, 10_rand_02.txt, 10_rand_03.txt, 10_rand_04.txt, 10_rand_05.txt, 10_rand_06.txt, 20_hand_01.txt, 20_hand_02.txt
Case Name Status Exec Time Memory
00_example_01.txt AC 3 ms 8572 KB
00_example_02.txt AC 3 ms 8572 KB
10_rand_01.txt AC 3 ms 8572 KB
10_rand_02.txt AC 3 ms 8572 KB
10_rand_03.txt AC 3 ms 8572 KB
10_rand_04.txt AC 3 ms 8572 KB
10_rand_05.txt AC 3 ms 8572 KB
10_rand_06.txt AC 3 ms 8572 KB
20_hand_01.txt AC 3 ms 8572 KB
20_hand_02.txt AC 3 ms 8572 KB