結果
問題 |
No.2091 Shio Ramen (Easy)
|
ユーザー |
![]() |
提出日時 | 2024-09-17 01:35:06 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 219 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 82,020 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2024-09-17 01:35:08 |
合計ジャッジ時間 | 1,614 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
N, S, K = map(int, input().split()) ans, d = -1, 10 ** 18 for i in range(N): x = int(input()) dd = abs(x - S) if dd > K: continue if dd < d: d = dd ans = i + 1 print(ans) if ans != -1 else print("Unlucky!")