結果
| 問題 | No.1469 programing | 
| コンテスト | |
| ユーザー |  game_krb | 
| 提出日時 | 2021-05-08 15:39:21 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 613 bytes | 
| コンパイル時間 | 2,232 ms | 
| コンパイル使用メモリ | 78,828 KB | 
| 実行使用メモリ | 55,024 KB | 
| 最終ジャッジ日時 | 2024-09-16 20:34:47 | 
| 合計ジャッジ時間 | 15,320 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 14 TLE * 1 | 
ソースコード
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int i = 0;
        while(i < s.length()){
            if(i == s.length()-1){
                System.out.print(s.charAt(i));
                break;
            }
            else if(s.charAt(i) != s.charAt(i+1)){
                System.out.print(s.charAt(i));
                i++;
            }
            else{
                System.out.print(s.charAt(i));
                i += 2;
             }
        }
        System.out.println();
    }
}
            
            
            
        