結果

問題 No.2063 ±2^k operations (easy)
ユーザー ks2m
提出日時 2022-09-02 21:52:47
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 397 bytes
コンパイル時間 2,663 ms
コンパイル使用メモリ 75,132 KB
実行使用メモリ 54,700 KB
最終ジャッジ日時 2024-11-16 03:14:11
合計ジャッジ時間 7,064 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		int[] c = new int[2];
		for (int i = 0; i < n.length; i++) {
			c[n[i] - '0']++;
		}

		if (c[0] == 2 || c[1] == 2) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
0