結果
問題 |
No.2091 Shio Ramen (Easy)
|
ユーザー |
|
提出日時 | 2022-10-16 02:13:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 51 ms / 2,000 ms |
コード長 | 320 bytes |
コンパイル時間 | 179 ms |
コンパイル使用メモリ | 82,332 KB |
実行使用メモリ | 55,936 KB |
最終ジャッジ日時 | 2024-06-30 02:25:06 |
合計ジャッジ時間 | 1,905 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
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!')