結果

問題 No.928 軽減税率?
ユーザー fukafukatani
提出日時 2019-11-23 10:37:34
言語 Rust
(1.83.0 + proconio)
結果
TLE  
実行時間 -
コード長 669 bytes
コンパイル時間 16,845 ms
コンパイル使用メモリ 378,064 KB
実行使用メモリ 13,640 KB
最終ジャッジ日時 2024-10-11 06:50:56
合計ジャッジ時間 42,050 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 2
other TLE * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cmp::*;
use std::collections::*;
use std::io::Write;

fn main() {
    let v = read_vec::<i64>();
    let (p, q, a) = (v[0], v[1], v[2]);
    let mut ans = 0;
    for x in 1..500000001 {
        if x * p / 100 < x * q / 100 + a {
            ans += 1;
        }
    }
    println!("{}", ans);
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
0