Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3cb4779

Browse files
GFG Geek and Function Solution
1 parent 09ed08f commit 3cb4779

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

‎Geeks-For-Geeks/Geek-and-Function-|V.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,21 @@
2323
Output:
2424
22
2525
74
26-
'''
26+
'''
27+
28+
t = int(input())
29+
30+
while t:
31+
n, k = input().split(' ')
32+
n, k = int(n), int(k)
33+
34+
res = n
35+
36+
for i in range(k):
37+
if not res % 10:
38+
break
39+
res ^= res % 10
40+
41+
print(res)
42+
43+
t -= 1

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /