結果

問題 No.231 めぐるはめぐる (1)
ユーザー papinianuspapinianus
提出日時 2016-07-28 08:42:32
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 438 bytes
コンパイル時間 2,534 ms
コンパイル使用メモリ 30,584 KB
実行使用メモリ 31,116 KB
最終ジャッジ日時 2024-04-24 10:28:26
合計ジャッジ時間 3,260 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 38 ms
31,072 KB
testcase_02 AC 38 ms
30,828 KB
testcase_03 AC 37 ms
30,996 KB
testcase_04 AC 36 ms
30,940 KB
testcase_05 AC 35 ms
30,920 KB
testcase_06 AC 35 ms
30,788 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 37 ms
31,116 KB
testcase_11 AC 36 ms
31,076 KB
testcase_12 AC 35 ms
30,824 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$n = trim(fgets(STDIN));
$dig = 0;
for($i = 0; $i < $n ; $i++) {
    list($exp, $death) = explode(" ", trim(fgets(STDIN)));
    $gain = $exp - $death*30000;
    if($gain > 500000) {
        $dig = $i+1;
        break;
    }
}
if($dig) {
    echo "YES".PHP_EOL;
    echo $dig.PHP_EOL;
    echo $dig.PHP_EOL;
    echo $dig.PHP_EOL;
    echo $dig.PHP_EOL;
    echo $dig.PHP_EOL;
    echo $dig.PHP_EOL;
} else {
    echo "NO".PHP_EOL;
}
0