結果

問題 No.908 うしたぷにきあくん文字列
ユーザー masa_ahemasa_ahe
提出日時 2020-03-13 19:41:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 2,342 ms
コンパイル使用メモリ 74,268 KB
実行使用メモリ 41,476 KB
最終ジャッジ日時 2024-05-02 04:57:42
合計ジャッジ時間 5,733 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,192 KB
testcase_01 AC 132 ms
41,176 KB
testcase_02 AC 127 ms
41,188 KB
testcase_03 AC 133 ms
41,240 KB
testcase_04 AC 128 ms
41,156 KB
testcase_05 AC 131 ms
40,892 KB
testcase_06 AC 142 ms
41,416 KB
testcase_07 AC 132 ms
41,236 KB
testcase_08 AC 131 ms
41,368 KB
testcase_09 AC 129 ms
41,412 KB
testcase_10 AC 128 ms
41,232 KB
testcase_11 AC 130 ms
41,164 KB
testcase_12 AC 128 ms
41,280 KB
testcase_13 AC 127 ms
41,028 KB
testcase_14 AC 132 ms
41,056 KB
testcase_15 AC 130 ms
41,144 KB
testcase_16 AC 128 ms
40,936 KB
testcase_17 AC 130 ms
41,412 KB
testcase_18 AC 129 ms
41,312 KB
testcase_19 AC 131 ms
41,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		String s=sc.nextLine();
		for(int i=0;i<s.length();i++){
			if(i%2==1){
				if(s.charAt(i)!=' '){
					System.out.println("No");
					return;
				}
			}else{
				if(s.charAt(i)==' '){
					System.out.println("No");
					return;
				}
			}
		}
		System.out.println("Yes");
	}
}
0