結果
問題 |
No.193 筒の数式
|
ユーザー |
![]() |
提出日時 | 2015-04-27 03:33:13 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 416 bytes |
コンパイル時間 | 1,166 ms |
コンパイル使用メモリ | 32,148 KB |
実行使用メモリ | 32,532 KB |
最終ジャッジ日時 | 2024-07-05 03:30:40 |
合計ジャッジ時間 | 1,611 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 5 WA * 11 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $stdin = trim(fgets(STDIN)); $n = strlen($stdin); $ans = null; for ($i = 0; $i < $n ;$i++){ $func = $stdin; if($i!=0){ $func1 = substr($stdin ,0,$i); $func2 = substr($stdin ,$i,$n-$i); $func = $func2.$func1; } $s=$func[0]; $e = $func[$n-1]; if($s==='+'||$s==='-'||$e==='+'||$e==='-'){ continue; } $result = ""; eval('$result = '.$func.';'); if ($ans==null || $ans > $result){ $ans = $result; } } echo $ans; ?>