Skip to content

Commit

Permalink
Create BaekJoon | 등차수열에서 항 번호 찾기.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hwahyeon authored Nov 15, 2023
1 parent 032c2f8 commit 72556b7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
a, d, k = map(int, input().split())
m = k-a
if m%d == 0 and m//d >= 0:
print(m//d + 1)
else:
print('X')

0 comments on commit 72556b7

Please sign in to comment.