結果
| 問題 | No.3481 495 |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-05-25 07:04:15 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 646 bytes |
| 記録 | |
| コンパイル時間 | 5,335 ms |
| コンパイル使用メモリ | 198,496 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-25 07:04:26 |
| 合計ジャッジ時間 | 11,597 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#![allow(non_snake_case, unused_imports)]
use proconio::{input, marker::Usize1, marker::Chars};
use itertools::Itertools;
#[allow(unused_macros)]
macro_rules! d {
( $( $x:expr ),* $(,)? ) => {
eprintln!(
concat!( $( stringify!($x), "={:?} " ),* ),
$( $x ),*
);
};
}
#[allow(dead_code)]
fn yn(b: bool) -> &'static str {
if b { "Yes" } else { "No" }
}
fn main() {
input! {
N: i64,
}
let xs = N.to_string()
.chars()
.map(|c| c.to_digit(10).unwrap())
.collect_vec();
let [a, b, c] = xs.try_into().unwrap();
println!("{}", yn(a + c == b));
}
norioc