結果

問題 No.231 めぐるはめぐる (1)
ユーザー kichirb3kichirb3
提出日時 2018-03-04 19:36:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 21 ms / 1,000 ms
コード長 666 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,776 KB
実行使用メモリ 8,896 KB
最終ジャッジ日時 2023-09-22 21:03:45
合計ジャッジ時間 1,292 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
8,736 KB
testcase_01 AC 18 ms
8,696 KB
testcase_02 AC 18 ms
8,708 KB
testcase_03 AC 18 ms
8,736 KB
testcase_04 AC 18 ms
8,896 KB
testcase_05 AC 18 ms
8,848 KB
testcase_06 AC 18 ms
8,728 KB
testcase_07 AC 17 ms
8,868 KB
testcase_08 AC 18 ms
8,848 KB
testcase_09 AC 18 ms
8,816 KB
testcase_10 AC 18 ms
8,844 KB
testcase_11 AC 17 ms
8,828 KB
testcase_12 AC 18 ms
8,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
"""
No.231 めぐるはめぐる (1)
https://yukicoder.me/problems/no/231

"""
import sys
from sys import stdin
from random import randint
input = stdin.readline


def main(args):
    N = int(input())
    dungeons = []
    for i in range(N):
        G, D = map(int, input().split())
        exp = G - 30000 * D
        if exp >= 30000*100/6:
            dungeons.append([exp, G, D, i+1])

    if dungeons:
        print('YES')
        limit = len(dungeons) - 1
        for _ in range(6):
            num = randint(0, limit)
            print(dungeons[num][3])
    else:
        print('NO')


if __name__ == '__main__':
    main(sys.argv[1:])
0