結果

問題 No.231 めぐるはめぐる (1)
ユーザー ohanaohana
提出日時 2023-10-23 11:04:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 248 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 81,760 KB
実行使用メモリ 63,096 KB
最終ジャッジ日時 2023-10-23 11:04:12
合計ジャッジ時間 2,572 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
63,096 KB
testcase_01 AC 39 ms
53,528 KB
testcase_02 AC 38 ms
53,528 KB
testcase_03 AC 46 ms
55,576 KB
testcase_04 AC 49 ms
61,048 KB
testcase_05 AC 42 ms
55,576 KB
testcase_06 AC 45 ms
55,576 KB
testcase_07 AC 39 ms
53,528 KB
testcase_08 AC 41 ms
55,576 KB
testcase_09 AC 37 ms
53,528 KB
testcase_10 AC 37 ms
53,528 KB
testcase_11 AC 37 ms
53,528 KB
testcase_12 AC 48 ms
55,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

d = 3 * 10**4
h = 3 * 10**6
c, it = 0, 0
for i in range(n):
    a, b = map(int, input().split())
    a = a - b * d
    if a > c:
        c, it = a, i + 1

if c * 6 >= h:
    print("YES", *[it] * 6, sep="\n")
else:
    print("NO")
0