 I am conflicted in my self about this matter, please help resolve.

Happened on the last Friday, I am an engineering student and had an exam on Friday on physics 2.

Bringing a calculator was a bliss because there were very difficult calculations with integrals, so I finish the exams 2 hours after it started, I pack up and a student from a different faculty comes to me and asks for my calculator(he forgot his), I say no because I don't know him and I am going north so I won't stay in the city, he keeps asking until I say firmly no, afterwards he looks defeated and walks away...

Now I go home and ask my wife about this, she says I did the correct thing, but let me point couple of thing.

I love to help, I rarely deny my help if someone asks.

The exams indeed required a calculator because there was a specific question that asked a question in this format 0.234 and not 1/2(the exam was hard af too)

I felt kinda bad for not helping him for the reason that in Israel after the army you are a part of the country brotherhood in a sense, most of the people act very friendly to each other...(except the elderly who still show racism toward Russians).

I had a spare one at home.

After couple days of reviewing my actions and the situation I kinda wanna go for the not an asshole, but something prevents me from doing it.

Side not: after reading my post it appears it is very difficult portraying this situation properly, but still AITA?