結果

問題 No.908 うしたぷにきあくん文字列
ユーザー tentententen
提出日時 2020-11-12 18:13:44
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 454 bytes
コンパイル時間 2,002 ms
コンパイル使用メモリ 71,412 KB
実行使用メモリ 56,136 KB
最終ジャッジ日時 2023-09-30 01:44:47
合計ジャッジ時間 5,951 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,832 KB
testcase_01 AC 119 ms
55,732 KB
testcase_02 AC 120 ms
56,068 KB
testcase_03 AC 120 ms
55,740 KB
testcase_04 AC 123 ms
55,812 KB
testcase_05 AC 119 ms
55,680 KB
testcase_06 WA -
testcase_07 AC 117 ms
56,096 KB
testcase_08 AC 121 ms
56,096 KB
testcase_09 WA -
testcase_10 AC 130 ms
55,744 KB
testcase_11 AC 122 ms
53,912 KB
testcase_12 AC 120 ms
55,464 KB
testcase_13 AC 122 ms
55,752 KB
testcase_14 WA -
testcase_15 AC 120 ms
55,548 KB
testcase_16 AC 119 ms
55,828 KB
testcase_17 AC 121 ms
55,500 KB
testcase_18 AC 125 ms
55,940 KB
testcase_19 AC 123 ms
56,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] arr = sc.nextLine().toCharArray();
        for (int i = 0; i < arr.length; i++) {
            if ((i % 2 == 0 && arr[i] < 'a' && arr[i] > 'z') || (i % 2 == 1 && arr[i] != ' ') ) {
                System.out.println("No");
                return;
            }
        }
    System.out.println("Yes");
    }
}
0