結果

問題 No.908 うしたぷにきあくん文字列
ユーザー seaside0002seaside0002
提出日時 2019-12-29 17:48:51
言語 PHP
(8.3.4)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 430 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 30,776 KB
実行使用メモリ 31,480 KB
最終ジャッジ日時 2024-04-23 23:40:13
合計ジャッジ時間 1,633 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
31,008 KB
testcase_01 AC 54 ms
31,204 KB
testcase_02 AC 35 ms
31,072 KB
testcase_03 AC 35 ms
30,856 KB
testcase_04 AC 35 ms
31,108 KB
testcase_05 AC 36 ms
31,288 KB
testcase_06 AC 34 ms
30,964 KB
testcase_07 AC 35 ms
31,200 KB
testcase_08 AC 33 ms
31,216 KB
testcase_09 AC 34 ms
31,132 KB
testcase_10 AC 33 ms
31,036 KB
testcase_11 AC 36 ms
31,320 KB
testcase_12 AC 33 ms
31,244 KB
testcase_13 AC 39 ms
31,072 KB
testcase_14 AC 36 ms
30,888 KB
testcase_15 AC 34 ms
31,100 KB
testcase_16 AC 33 ms
31,480 KB
testcase_17 AC 33 ms
31,396 KB
testcase_18 AC 33 ms
31,020 KB
testcase_19 AC 34 ms
31,008 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$target = str_split(trim(fgets(STDIN)));

if(!(checkEven($target))){
	die('No');
}

if(!(checkOdd($target))){
	die('No');
}

echo 'Yes';


function checkEven($target){
	for($i = 0; $i < count($target); $i += 2){
		if($target[$i] == ' '){
			return false;
		}
	}
	
	return true;
}

function checkOdd($target){
	for($i = 1; $i < count($target); $i += 2){
		if(!($target[$i] == ' ')){
			return false;
		}
	}
	
	return true;	
}
0