結果

問題 No.908 うしたぷにきあくん文字列
ユーザー Beat7501Beat7501
提出日時 2019-10-25 19:20:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 443 bytes
コンパイル時間 3,996 ms
コンパイル使用メモリ 71,320 KB
実行使用メモリ 57,908 KB
最終ジャッジ日時 2023-09-28 21:28:44
合計ジャッジ時間 7,764 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,884 KB
testcase_01 AC 119 ms
55,680 KB
testcase_02 AC 119 ms
55,768 KB
testcase_03 AC 118 ms
55,968 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 118 ms
55,692 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 120 ms
55,860 KB
testcase_11 AC 121 ms
55,676 KB
testcase_12 WA -
testcase_13 AC 119 ms
55,964 KB
testcase_14 WA -
testcase_15 AC 118 ms
55,868 KB
testcase_16 WA -
testcase_17 AC 119 ms
56,060 KB
testcase_18 WA -
testcase_19 AC 120 ms
55,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main1{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean flag = true;
		for(int i = 0; i < s.length(); i++){
			if(i%2 == 0){
				if(!(s.charAt(i)>=97&&s.charAt(i)<=122)){
					flag = false;
					break;
				}
			}else{
				if(!(s.substring(i,i+1).equals(" "))){
					flag = false;
					break;
				}
			}
		}
		System.out.println(flag?"Yes":"No");
	}
}
0