結果

問題 No.908 うしたぷにきあくん文字列
ユーザー d-yoshd-yosh
提出日時 2019-12-09 08:33:35
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 611 bytes
コンパイル時間 2,240 ms
コンパイル使用メモリ 72,408 KB
実行使用メモリ 56,348 KB
最終ジャッジ日時 2023-09-02 13:19:21
合計ジャッジ時間 6,101 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,884 KB
testcase_01 AC 118 ms
55,756 KB
testcase_02 AC 117 ms
55,928 KB
testcase_03 AC 116 ms
55,844 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 114 ms
55,848 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 116 ms
55,616 KB
testcase_11 AC 116 ms
55,768 KB
testcase_12 WA -
testcase_13 AC 121 ms
55,512 KB
testcase_14 WA -
testcase_15 AC 115 ms
55,468 KB
testcase_16 WA -
testcase_17 AC 115 ms
55,512 KB
testcase_18 WA -
testcase_19 AC 115 ms
55,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

        for (int i = 0; i < chars.length; i++) {
            if(i % 2 == 0) {
                if(chars[i] == ' ') {
                    System.out.println("No");
                    return;
                }
            }else {
                if(chars[i] != ' ') {
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
}
0