結果

問題 No.2091 Shio Ramen (Easy)
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2022-10-16 02:13:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 942 ms
コンパイル使用メモリ 87,160 KB
実行使用メモリ 73,244 KB
最終ジャッジ日時 2023-09-12 14:21:02
合計ジャッジ時間 2,969 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
72,872 KB
testcase_01 AC 109 ms
73,212 KB
testcase_02 AC 106 ms
73,012 KB
testcase_03 AC 109 ms
73,200 KB
testcase_04 AC 108 ms
72,972 KB
testcase_05 AC 107 ms
73,244 KB
testcase_06 AC 108 ms
72,808 KB
testcase_07 AC 108 ms
73,024 KB
testcase_08 AC 107 ms
72,976 KB
testcase_09 AC 106 ms
72,908 KB
testcase_10 AC 107 ms
72,820 KB
testcase_11 AC 108 ms
73,092 KB
testcase_12 AC 107 ms
73,024 KB
testcase_13 AC 109 ms
72,824 KB
testcase_14 AC 108 ms
73,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

N,S,K = map(int,input().split())
A = [int(input()) for _ in range(N)]
X = [(abs(A[i]-S),i) for i in range(N)]
X.sort()
if X[0][0]<=K:
    print(X[0][1]+1)
else:
    print('Unlucky!')
0