結果
問題 | No.1926 Sequence of Remainders |
ユーザー |
|
提出日時 | 2024-07-03 13:46:52 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 179 ms / 2,000 ms |
コード長 | 295 bytes |
コンパイル時間 | 13,322 ms |
コンパイル使用メモリ | 385,160 KB |
実行使用メモリ | 7,424 KB |
最終ジャッジ日時 | 2024-07-03 13:47:16 |
合計ジャッジ時間 | 23,163 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
ソースコード
use std::io::Read;fn main() {let mut s = String::new();std::io::stdin().read_to_string(&mut s).ok();let v: Vec<u64> =s.split_whitespace().skip(1).flat_map(str::parse).collect();for n in v.chunks(3) {let a = n[2] % n[1];println!("{}", if a < n[1] - n[0] { a } else { 0 })}}