結果
問題 |
No.1556 Power Equality
|
ユーザー |
![]() |
提出日時 | 2021-06-25 21:44:48 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,185 bytes |
コンパイル時間 | 14,497 ms |
コンパイル使用メモリ | 384,572 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 08:21:15 |
合計ジャッジ時間 | 13,046 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 WA * 2 |
ソースコード
#![allow(non_snake_case)] use crate::scanner::Scanner; fn main() { let mut scan = Scanner::new(); let a = scan.long(); let b = scan.long(); println!("{}", if a == b { "Yes" } else { "No" }); } pub mod scanner { use std::io::{stdin, BufReader, Bytes, Read, Stdin}; use std::str::FromStr; pub struct Scanner { buf: Bytes<BufReader<Stdin>>, } impl Scanner { pub fn new() -> Scanner { Scanner { buf: BufReader::new(stdin()).bytes(), } } #[inline] fn token<T: std::iter::FromIterator<char>>(&mut self) -> T { self.buf .by_ref() .map(|c| c.unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect() } #[inline] pub fn read<T: FromStr>(&mut self) -> T { self.string().parse().ok().unwrap() } #[inline] pub fn string(&mut self) -> String { self.token() } #[inline] pub fn long(&mut self) -> i64 { self.read() } } }