結果

問題 No.231 めぐるはめぐる (1)
ユーザー ohanaohana
提出日時 2023-10-23 11:04:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 248 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 82,384 KB
実行使用メモリ 62,020 KB
最終ジャッジ日時 2024-09-22 10:02:01
合計ジャッジ時間 1,400 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
62,020 KB
testcase_01 AC 40 ms
54,068 KB
testcase_02 AC 39 ms
53,476 KB
testcase_03 AC 48 ms
55,968 KB
testcase_04 AC 50 ms
61,736 KB
testcase_05 AC 43 ms
55,244 KB
testcase_06 AC 46 ms
55,792 KB
testcase_07 AC 39 ms
53,956 KB
testcase_08 AC 42 ms
54,404 KB
testcase_09 AC 37 ms
52,864 KB
testcase_10 AC 38 ms
52,156 KB
testcase_11 AC 37 ms
52,832 KB
testcase_12 AC 45 ms
55,184 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