結果
| 問題 | No.632 穴埋め門松列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-05 13:02:40 |
| 言語 | PHP (8.5.4) |
| 結果 |
AC
|
| 実行時間 | 50 ms / 1,000 ms |
| コード長 | 498 bytes |
| 記録 | |
| コンパイル時間 | 193 ms |
| コンパイル使用メモリ | 37,668 KB |
| 実行使用メモリ | 75,884 KB |
| 最終ジャッジ日時 | 2026-04-02 06:48:19 |
| 合計ジャッジ時間 | 1,127 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;