結果

問題 No.2063 ±2^k operations (easy)
ユーザー AsahiAsahi
提出日時 2023-01-06 18:26:26
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,119 bytes
コンパイル時間 2,502 ms
コンパイル使用メモリ 77,884 KB
実行使用メモリ 42,980 KB
最終ジャッジ日時 2024-05-07 18:35:34
合計ジャッジ時間 7,037 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
41,396 KB
testcase_01 AC 99 ms
40,288 KB
testcase_02 AC 112 ms
41,356 KB
testcase_03 AC 107 ms
41,556 KB
testcase_04 AC 106 ms
41,200 KB
testcase_05 WA -
testcase_06 AC 107 ms
41,052 KB
testcase_07 AC 103 ms
39,992 KB
testcase_08 AC 110 ms
41,080 KB
testcase_09 AC 107 ms
41,200 KB
testcase_10 AC 100 ms
40,312 KB
testcase_11 AC 103 ms
40,684 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 112 ms
40,900 KB
testcase_15 WA -
testcase_16 AC 113 ms
41,028 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;
 
public class Main{
    public static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
    public static final int INFI = Integer.MAX_VALUE;
    public static final long INFL = Long.MAX_VALUE;
    public static final int MOD = 1000000007;
    public static PrintWriter output = new PrintWriter(System.out);
    public static Scanner sc = new Scanner(System.in);
    public static final int [] dy4 = {0,1,0,-1};
    public static final int [] dx4 = {1,0,-1,0};
    public static ArrayList<ArrayList<Integer>> list = new ArrayList<>();
    public static ArrayList<Integer> answer = new ArrayList<>();
    public static boolean [] visited ;
    public static void main(String[] args) throws IOException{
        StringTokenizer st;
        //st = new StringTokenizer(buff.readLine());
        String N = sc.next();
        long oe = Long.parseLong(N,2);
        int one = 0;
        for(int i=0;i<N.length();i++) if(N.charAt(i) == '1') one++;
        output.print(one == 1 || oe % 2 != 0 ? "No" : "Yes");
        output.flush();
    }
}
0