結果
問題 | No.2322 MMA文字列 |
ユーザー |
|
提出日時 | 2023-05-28 13:34:35 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 1,220 bytes |
コンパイル時間 | 12,834 ms |
コンパイル使用メモリ | 378,340 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 20:57:35 |
合計ジャッジ時間 | 14,037 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
#![allow(dead_code)]fn input_num() -> usize {let mut line: String = String::new();std::io::stdin().read_line(&mut line).unwrap();line.trim().parse().unwrap()}fn input_chars() -> Vec<char> {let mut line: String = String::new();std::io::stdin().read_line(&mut line).unwrap();line.trim().chars().collect()}fn input_nums() -> (usize, f64, f64) {let mut line: String = String::new();std::io::stdin().read_line(&mut line).unwrap();let mut iter = line.split_whitespace();(iter.next().unwrap().parse().unwrap(),iter.next().unwrap().parse().unwrap(),iter.next().unwrap().parse().unwrap())}fn input_vec_nums() -> Vec<usize> {let mut line: String = String::new();std::io::stdin().read_line(&mut line).unwrap();line.split_whitespace().map(|x| x.parse().unwrap()).collect()}fn input_str() -> String {let mut line: String = String::new();std::io::stdin().read_line(&mut line).unwrap();for _ in 0..2 { line.remove(line.len() - 1); }line}fn main() {let s = input_chars();if s[0] == s[1] && s[0] != s[2] {println!("Yes");} else {println!("No");}}