結果
問題 | No.128 お年玉(1) |
ユーザー |
![]() |
提出日時 | 2017-11-03 20:51:40 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 559 bytes |
コンパイル時間 | 16,892 ms |
コンパイル使用メモリ | 386,072 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 10:44:07 |
合計ジャッジ時間 | 18,267 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
use std::io;use std::str::FromStr;fn main() {let stdin = io::stdin();let mut buf = String::new();stdin.read_line(&mut buf).ok();let mut it = buf.split_whitespace().map(|n| u64::from_str(n).unwrap());let a = it.next().unwrap();let mut buf = String::new();stdin.read_line(&mut buf).ok();let mut it = buf.split_whitespace().map(|n| u64::from_str(n).unwrap());let b = it.next().unwrap();let d = a / b;if d < 1000 {println!("{}", 0);return;}println!("{}", d - d % 1000);}