結果

問題 No.928 軽減税率?
ユーザー fukafukatani
提出日時 2019-11-23 10:36:37
言語 Rust
(1.83.0 + proconio)
結果
TLE  
実行時間 -
コード長 670 bytes
コンパイル時間 15,024 ms
コンパイル使用メモリ 378,768 KB
実行使用メモリ 15,424 KB
最終ジャッジ日時 2024-10-11 13:03:16
合計ジャッジ時間 17,924 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 1 -- * 1
other -- * 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..1000000001 {
        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