結果
| 問題 |
No.632 穴埋め門松列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-05 13:02:40 |
| 言語 | PHP (843.2) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 1,000 ms |
| コード長 | 498 bytes |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 32,148 KB |
| 実行使用メモリ | 31,640 KB |
| 最終ジャッジ日時 | 2024-07-18 13:31:01 |
| 合計ジャッジ時間 | 755 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$input=trim(fgets(STDIN));
$oneSubstitution=explode(" ",str_replace("?",1,$input));
$fourSubstitution=explode(" ",str_replace("?",4,$input));
$oneMax=max($oneSubstitution);
$oneMin=min($oneSubstitution);
$fourMax=max($fourSubstitution);
$fourMin=min($fourSubstitution);
$ans=null;
if($oneMax==$oneSubstitution[1]||$oneMin==$oneSubstitution[1]){
$ans=1;
}
if($fourMax==$fourSubstitution[1]||$fourMin==$fourSubstitution[1]){
if($ans===1){
$ans=14;
}else{
$ans=4;
}
}
echo $ans;