結果
問題 |
No.2091 Shio Ramen (Easy)
|
ユーザー |
|
提出日時 | 2023-01-19 09:51:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 26 ms / 2,000 ms |
コード長 | 203 bytes |
コンパイル時間 | 67 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-06-30 02:28:28 |
合計ジャッジ時間 | 989 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
N,S,K=map(int,input().split()) A=[] for i in range(N): A.append(int(input())) res=0 for i in range(N): if abs(A[i]-S)<abs(A[res]-S): res=i if abs(A[res]-S)<=K: print(res+1) else: print("Unlucky!")