結果

問題 No.1469 programing
ユーザー harurun
提出日時 2021-04-03 17:44:52
言語 Rust
(1.83.0 + proconio)
結果
TLE  
実行時間 -
コード長 369 bytes
コンパイル時間 16,796 ms
コンパイル使用メモリ 377,816 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-12-25 03:52:05
合計ジャッジ時間 41,044 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 TLE * 6
権限があれば一括ダウンロードができます

ソースコード

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