結果

問題 No.1469 programing
ユーザー ks2mks2m
提出日時 2021-04-09 21:21:45
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 356 bytes
コンパイル時間 2,036 ms
コンパイル使用メモリ 72,076 KB
実行使用メモリ 115,176 KB
最終ジャッジ日時 2023-09-07 09:36:12
合計ジャッジ時間 15,835 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
55,880 KB
testcase_01 AC 96 ms
56,104 KB
testcase_02 AC 104 ms
55,996 KB
testcase_03 AC 107 ms
56,268 KB
testcase_04 AC 132 ms
56,308 KB
testcase_05 AC 154 ms
56,428 KB
testcase_06 AC 142 ms
55,840 KB
testcase_07 AC 157 ms
56,220 KB
testcase_08 AC 508 ms
65,708 KB
testcase_09 AC 569 ms
65,416 KB
testcase_10 AC 549 ms
65,724 KB
testcase_11 AC 891 ms
67,468 KB
testcase_12 AC 758 ms
66,748 KB
testcase_13 AC 97 ms
55,880 KB
testcase_14 AC 814 ms
67,644 KB
testcase_15 AC 750 ms
67,532 KB
testcase_16 AC 773 ms
67,664 KB
testcase_17 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		sc.close();

		System.out.print(s[0]);
		for (int i = 1; i < s.length; i++) {
			if (s[i - 1] != s[i]) {
				System.out.print(s[i]);
			}
		}
		System.out.println();
	}
}
0