結果
問題 | No.293 4>7の世界 |
ユーザー |
![]() |
提出日時 | 2015-11-19 20:49:46 |
言語 | PHP (843.2) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 587 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 32,144 KB |
実行使用メモリ | 32,656 KB |
最終ジャッジ日時 | 2024-09-13 17:03:20 |
合計ジャッジ時間 | 1,918 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 18 WA * 2 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?phpfscanf(STDIN, "%d %d", $b, $c);$tmp_b = $b;$tmp_c = $c;if (preg_match("/4|7/", $b) && preg_match("/4|7/", $c) && checkdata($b,$c)){$list = array("4"=>"7", "7"=>"4");$tmp_b = strtr($b, $list);$tmp_c = strtr($c, $list);}if($tmp_b < $tmp_c) echo $c;if($tmp_c < $tmp_b) echo $b;echo "\n";function checkdata($b,$c){if(strstr($b,"4") && strstr($c,"4")){if(!strstr($b,"7") && !strstr($c,"7")) return false;}if(strstr($b,"7") && strstr($c,"7")){if(!strstr($b,"4") && !strstr($c,"4")) return false;}return true;}?>