結果
| 問題 | No.773 コンテスト |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-08 15:55:42 |
| 言語 | Rust (1.93.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 546 bytes |
| 記録 | |
| コンパイル時間 | 15,921 ms |
| コンパイル使用メモリ | 199,016 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-02-08 15:56:00 |
| 合計ジャッジ時間 | 3,343 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
fn main() {
let stdin = std::io::read_to_string(std::io::stdin()).unwrap();
let mut stdin = stdin.split_ascii_whitespace();
let a: u8 = stdin.next().unwrap().parse().unwrap();
let b: u8 = stdin.next().unwrap().parse().unwrap();
use std::io::Write;
let mut out = std::io::BufWriter::new(std::io::stdout().lock());
out.write_all(output(solve(a, b)).as_bytes()).unwrap();
}
fn solve(a: u8, b: u8) -> u8 {
3 - (b.min(25) + 1).saturating_sub(a.max(23))
}
fn output(ans: u8) -> String {
ans.to_string() + "\n"
}