結果

問題 No.1469 programing
ユーザー AsahiAsahi
提出日時 2023-02-06 22:45:58
言語 Java19
(openjdk 21)
結果
AC  
実行時間 550 ms / 3,000 ms
コード長 600 bytes
コンパイル時間 4,069 ms
コンパイル使用メモリ 74,096 KB
実行使用メモリ 91,380 KB
最終ジャッジ日時 2023-09-18 08:31:29
合計ジャッジ時間 9,438 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,612 KB
testcase_01 AC 124 ms
57,584 KB
testcase_02 AC 125 ms
55,692 KB
testcase_03 AC 125 ms
53,312 KB
testcase_04 AC 134 ms
55,764 KB
testcase_05 AC 145 ms
55,600 KB
testcase_06 AC 135 ms
55,840 KB
testcase_07 AC 143 ms
55,816 KB
testcase_08 AC 257 ms
57,272 KB
testcase_09 AC 261 ms
58,976 KB
testcase_10 AC 258 ms
56,044 KB
testcase_11 AC 298 ms
59,072 KB
testcase_12 AC 281 ms
59,292 KB
testcase_13 AC 124 ms
55,508 KB
testcase_14 AC 315 ms
58,552 KB
testcase_15 AC 297 ms
56,384 KB
testcase_16 AC 334 ms
59,272 KB
testcase_17 AC 550 ms
91,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;
// import java.util.stream.Stream;

class Main{
    static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st;
    static PrintWriter output = new PrintWriter(System.out);
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws IOException{
        String s = sc.next();
        s += "A";
        for(int i=0;i<s.length()-1;i++) {
            if(s.charAt(i) != s.charAt(i+1)) output.print(s.charAt(i));
        }
        output.flush();
    }
}
0