diff --git a/1560A.py b/1560A.py new file mode 100644 index 0000000..afe9b0a --- /dev/null +++ b/1560A.py @@ -0,0 +1,23 @@ +class Solution: + def __init__(self): + self.ans = [] + + i = 0 + count = 1 + while i!= 1003: + if count%3 !=0: + + if str(count)[-1] != "3": + i+=1 + self.ans.append(count) + count+=1 + + def find(self): + t = int(input()) + + for i in range(t): + x = int(input()) + print(self.ans[x-1]) + +obj = Solution() +obj.find()