結果
問題 | No.682 Average |
ユーザー | おおおきに |
提出日時 | 2018-05-12 00:05:22 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 429 bytes |
コンパイル時間 | 12,161 ms |
コンパイル使用メモリ | 378,584 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 09:08:48 |
合計ジャッジ時間 | 13,004 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
use std::io::{Read, stdin}; fn main() { let mut buf = String::new(); stdin().read_to_string(&mut buf).unwrap(); let mut tok = buf.split_whitespace(); let mut get = || tok.next().unwrap().parse::<i64>().unwrap(); let a = get(); let b = get(); let mut ans = 0; for i in a..b+1 { let sum = a + b + i; if sum % 3 == 0 { ans += 1; } } println!("{}", ans); }