結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,836 KB
testcase_01 AC 116 ms
55,700 KB
testcase_02 AC 118 ms
55,876 KB
testcase_03 AC 119 ms
55,988 KB
testcase_04 AC 116 ms
56,188 KB
testcase_05 AC 118 ms
55,924 KB
testcase_06 AC 121 ms
56,256 KB
testcase_07 AC 120 ms
56,072 KB
testcase_08 AC 118 ms
53,720 KB
testcase_09 AC 118 ms
55,856 KB
testcase_10 AC 119 ms
54,148 KB
testcase_11 AC 121 ms
55,716 KB
testcase_12 AC 120 ms
55,692 KB
testcase_13 AC 120 ms
55,884 KB
testcase_14 AC 122 ms
55,792 KB
testcase_15 AC 118 ms
55,944 KB
testcase_16 AC 119 ms
55,724 KB
testcase_17 AC 120 ms
55,712 KB
testcase_18 AC 121 ms
55,716 KB
testcase_19 AC 120 ms
56,288 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