⌨️
[AtCoder]ABC-113|B - Palace
設問ページ
提出結果
def getInt():
return int(input())
def getIntMap():
return map(int, input().split())
def getIntList():
return list(map(int, input().split()))
def main():
n = getInt()
t, a = getIntMap()
h = getIntList()
x = []
for i in range(len(h)):
y = abs((t - h[i] * 0.006) - a)
x.append([y, i + 1])
x.sort()
print(x[0][1])
if __name__ == "__main__":
main()
Discussion