結果
問題 |
No.928 軽減税率?
|
ユーザー |
![]() |
提出日時 | 2019-11-23 10:33:31 |
言語 | Rust (1.83.0 + proconio) |
結果 |
TLE
|
実行時間 | - |
コード長 | 708 bytes |
コンパイル時間 | 13,427 ms |
コンパイル使用メモリ | 377,516 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-10-11 13:02:26 |
合計ジャッジ時間 | 18,533 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 -- * 1 |
other | -- * 34 |
ソースコード
#![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 criterion = |x| x * p / 100 < x * q / 100 + a; let mut ans = 0; for i in 1..1000000001 { if criterion(i) { 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() }