結果

問題 No.1469 programing
ユーザー harurunharurun
提出日時 2021-04-03 17:44:52
言語 Rust
(1.77.0)
結果
TLE  
実行時間 -
コード長 369 bytes
コンパイル時間 565 ms
コンパイル使用メモリ 137,656 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-08-26 09:27:46
合計ジャッジ時間 6,600 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 10 ms
4,388 KB
testcase_06 AC 3 ms
4,380 KB
testcase_07 AC 10 ms
4,380 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main(){
  let s = {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim_end().to_owned()
  };
  let length =s.chars().count();
  print!("{}",s.chars().nth(0).unwrap());
  for i in 1..length{
    if s.chars().nth(i-1).unwrap()!=s.chars().nth(i).unwrap(){
      print!("{}",s.chars().nth(i).unwrap());
    }
  }
  print!("\n");
}
0