qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N, K = map(int, input().split())

mod = 10 ** 9 + 7

memo = [0] * (K + 1)
ans = 0
for i in range(K, 0, -1):
    tmp = (K // i) ** N
    j = 2
    while i * j <= K:
        tmp -= memo[i * j]
        j += 1
    memo[i] = tmp
ans = 0
for i in range(1, K+1):
    ans += (memo[i] * i) % mod
    ans %= mod

print(ans)


Fixed code:
N, K = map(int, input().split())

mod = 10 ** 9 + 7

memo = [0] * (K + 1)
ans = 0
for i in range(K, 0, -1):
    memo[i] = pow(K // i, N, mod)
    j = 2
    while i * j <= K:
        memo[i] -= memo[i * j]
        j += 1
    ans += memo[i] * i
    ans %= mod

print(ans)
Buggy code:
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    N, K = map(int, input().split())
    MOD = 10 ** 9 + 7

    ans = 0
    memo = [0] * (K+1)
    def getLarge(x):
        if x == 1:
            return sum(memo)
        else:
            return sum(memo[x::x])

    for i in range(K, 0, -1):
        Ki = K // i
        c = Ki ** N - getLarge(i)
        memo[i] = c
        ans += i * c % MOD
    print(ans % MOD)

if __name__ == '__main__':
    main()


Fixed code:
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    N, K = map(int, input().split())
    MOD = 10 ** 9 + 7

    ans = 0
    memo = [0] * (K+1)
    def getLarge(x):
        if x == 1:
            return sum(memo)
        else:
            return sum(memo[x::x])

    for i in range(K, 0, -1):
        Ki = K // i
        c = pow(Ki, N, MOD) - getLarge(i) % MOD
        memo[i] = c
        ans += i * c
        ans %= MOD
    print(ans % MOD)

if __name__ == '__main__':
    main()
Buggy code:
N, K = map(int, input().split())
MOD = 10**9 + 7

dp = [0] * (K + 1)
ans = 0
for k in range(K, 0, -1):
    num = K // k
    dp[k] = pow(num, N)
    for n in range(2, num+1):
        if n*k <= K:
            dp[k] -= dp[n*k]
            dp[k] %= MOD

    ans += dp[k] * k % MOD
    ans %= MOD

print(ans)

Fixed code:
N, K = map(int, input().split())
MOD = 10**9 + 7

dp = [0] * (K + 1)
ans = 0
for k in range(K, 0, -1):
    num = K // k
    dp[k] = pow(num, N, MOD)
    for n in range(2, num+1):
        if n*k <= K:
            dp[k] -= dp[n*k]
            dp[k] %= MOD

    ans += dp[k] * k % MOD
    ans %= MOD

print(ans)
Buggy code:
mod = 10 ** 9 + 7

n, k = map(int, input().split())
gcd_dp = [0] * (k + 1)

for i in range(k, 0, -1):
    gcd_dp[i] = (k // i) ** n
    a = 2
    while i * a <= k:
        gcd_dp[i] -= gcd_dp[i * a]
        a += 1

ret = 0
for i in range(k + 1):
    ret += (i % mod) * (gcd_dp[i] % mod)
    ret %= mod
print(ret)

Fixed code:
Mod = 10 ** 9 + 7

n, k = map(int, input().split())
gcd_dp = [0] * (k + 1)

for i in range(k, 0, -1):
    gcd_dp[i] = pow(k // i, n, Mod)
    a = 2
    while i * a <= k:
        gcd_dp[i] -= gcd_dp[i * a]
        a += 1

ret = 0
for i in range(k + 1):
    ret += (i % Mod) * (gcd_dp[i] % Mod)
    ret %= Mod
print(ret)
Buggy code:
import sys
from collections import *
import heapq
import math
from math import gcd
import bisect
import copy
from itertools import permutations,accumulate,combinations,product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n,k=map(int,input().split())
ans=0
lst=[0]*(k+1)
for i in range(k):
    tori=k//(k-i)
    lst[k-i]=pow(tori,n,mod)
    for j in range(1,tori):
        lst[k-i]-=lst[(k-i)*(j+1)]
# print(lst)
for i in range(k):
    ans+=lst[i+1]*(i+1)
print(ans)

Fixed code:
import sys
from collections import *
import heapq
import math
from math import gcd
import bisect
import copy
from itertools import permutations,accumulate,combinations,product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n,k=map(int,input().split())
ans=0
lst=[0]*(k+1)
for i in range(k):
    tori=k//(k-i)
    lst[k-i]=pow(tori,n,mod)
    for j in range(1,tori):
        lst[k-i]-=lst[(k-i)*(j+1)]
# print(lst)
for i in range(k):
    ans+=lst[i+1]*(i+1)
    ans%=mod
print(ans)
Buggy code:
N, K = map(int, input().split())

def func(n):
    r = n
    for i in range(2, n + 1):
        if i ** 2 > n:
            break

        if n % i == 0:
            r -= r // i
            while n % i == 0:
                n //= i
        
    if n > 1:
        r -= r // n
    return r


MOD = 10 ** 9 + 7
ans = 0
for i in range(1, K + 1):
    ans += func(i) * pow(K // i, N, MOD)
print(ans)


Fixed code:
N, K = map(int, input().split())

def func(n):
    r = n
    for i in range(2, n + 1):
        if i ** 2 > n:
            break

        if n % i == 0:
            r -= r // i
            while n % i == 0:
                n //= i
        
    if n > 1:
        r -= r // n
    return r


MOD = 10 ** 9 + 7
ans = 0
for i in range(1, K + 1):
    ans += func(i) * pow(K // i, N, MOD)
print(ans % MOD)
Buggy code:
M = 1000000007

N, K = [int(s) for s in input().split()]

A = [0] + [0 for _ in range(1, K+1)]
for k in range(K, 0, -1):
    if k * 2 > K:
        A[k] = 1
    else:
        A[k] = pow(K // k, N, M)
        i = 2
        while k * i <= K:
            A[k] -= A[k * i]
            i += 1

S = 0
for k in range(1, K+1):
    S += (A[k] * k) % M

print(S)


Fixed code:
M = 1000000007

N, K = [int(s) for s in input().split()]

A = [0] + [0 for _ in range(1, K+1)]
for k in range(K, 0, -1):
    if k * 2 > K:
        A[k] = 1
    else:
        A[k] = pow(K // k, N, M)
        i = 2
        while k * i <= K:
            A[k] -= A[k * i]
            i += 1

S = 0
for k in range(1, K+1):
    S = (S + A[k] * k) % M

print(S)
Buggy code:
N, K = map(int, input().split())
mod = 10**9+7
kosu_table = [0]*(K+1)
i = K
while i > 0:
  kosu_table[i] = pow(K//i, N, mod)
  j = 2
  while i*j <= K:
    kosu_table[i] -= kosu_table[i*j]
    j += 1
  i -= 1
print(sum([i*kosu_table[i] for i in range(1, K+1)]))


Fixed code:
N, K = map(int, input().split())
mod = 10**9+7
kosu_table = [0]*(K+1)
i = K
while i > 0:
  kosu_table[i] = pow(K//i, N, mod)
  j = 2
  while i*j <= K:
    kosu_table[i] -= kosu_table[i*j]
    j += 1
  i -= 1
print(sum([i*kosu_table[i] for i in range(1, K+1)])%mod)
Buggy code:
N, K = map(int, input().split())
mod = 10**9+7

cnt = [0] * (K+1)
ans = 0
for i in range(1, K+1):
    f = i - cnt[i]
    ans = (ans + f * (K//i)**N) % mod
    for j in range(2*i, K+1, i):
        cnt[j] += f
print(ans)



Fixed code:
N, K = map(int, input().split())
mod = 10**9+7

cnt = [0] * (K+1)
ans = 0
for i in range(1, K+1):
    f = i - cnt[i]
    ans = (ans + f * pow(K//i, N, mod)) % mod
    for j in range(2*i, K+1, i):
        cnt[j] += f
print(ans)
Buggy code:
a, b, c = map(int, split(input()))
print(c, a, b)

Fixed code:
a, b, c, = map(int, input().split())
a, b = b, a
a, c = c, a
print(a, b, c)
Buggy code:
x,y,z=map(int,input().split())
print(z,y,x)


Fixed code:
x, y, z = map(int, input().split())

temp = x
x = y
y = temp

temp = x
x = z
z = temp

print(x, y, z)
Buggy code:
x,y,z = map(int,input().split())
tmp = x
x = y
y = tmp
print(x,y,z)
tmp = x
x = z
z = tmp

print(x,y,z)

Fixed code:
x, y, z = map(int, (input().split()))
print(z, x, y)
Buggy code:
x, y, z = map(int, input().split())
print(y, z, x)

Fixed code:
x, y, z = list(map(int, input().split()))
print(z, x,y)
Buggy code:
a,b,c=map(int,input().split())
t=a;
a=b;
b=a;

t=c;
c=b;
b=t;

print(a, b, c)

Fixed code:
a,b,c=map(int,input().split())
t=a;
a=b;
b=t;
 
t=a;
a=c;
c=t;
 
print(a, b, c)
Buggy code:
a, b, c = map(int, input().split())

print(b,c,a)

Fixed code:
a, b, c = map(int, input().split(" "))
print(c, a, b)
Buggy code:
from collections import *
from heapq import *
from itertools import *
#from fractions import gcd

from decimal import *
import copy
from bisect import *
import time
import sys
import math

input=lambda :sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**7)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))

X,Y,Z=map(int,input().split())
print(Z,Y,X)


Fixed code:
from collections import *
from heapq import *
from itertools import *
#from fractions import gcd

from decimal import *
import copy
from bisect import *
import time
import sys
import math

input=lambda :sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**7)
def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))

X,Y,Z=map(int,input().split())
print(Z,X,Y)
Buggy code:
x, y, z = map(int, input().split())
print(z, y, x)

Fixed code:
x, y, z=map(int, input().split())
print(z,x,y)
Buggy code:
X, Y, Z = map(int, input.split())
print(Z, X, Y)

Fixed code:
X, Y ,Z = (map(int, input().split()))

print(Z,X,Y)
Buggy code:
import sys
input = sys.stdin.readline

def linput():
    return [int(x) for x in input().split()]

x, y, z = linput()

print(z, y, x)

Fixed code:
import sys
input = sys.stdin.readline

def linput():
    return [int(x) for x in input().split()]

x, y, z = linput()

print(z, x, y)
Buggy code:
x, y, z =map(int, input().split())
A=[z, x, y]
print(' '.join(A))


Fixed code:
x, y, z =map(int, input().split())
A=[z, x, y]
print(' '.join(map(str, A)))
Buggy code:
X,Y,Z=map(int,input().split()))

print(Z, X, Y)






Fixed code:
X,Y,Z=list(map(int,input().split()))

print(Z, X, Y)
Buggy code:
e =list(map(int,input().split()))
a = e[0]
b = e[1]
e[0] = b
e[1] = a

c = e[1]
d = e[2]
e[1]= d
e[2]= c
for i in range(3):
  print(e[i], end =" ")

Fixed code:
e =list(map(int,input().split()))
a = e[0]
b = e[1]
e[0] = b
e[1] = a

c = e[0]
d = e[2]
e[0]= d
e[2]= c
for i in range(3):
  print(e[i], end =" ")
Buggy code:
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip.split())
def main():
    x,y,x = LI()
    print(z,x,y)
main()

Fixed code:
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip.split())
def main():
    x,y,z = LI()
    print(z,x,y)
main()
Buggy code:
A = list(map(int,input().split()))
B = []
B.append(A[2])
B.append(A[0])
B.append(A[1])
print(B)

Fixed code:
A = list(map(int,input().split()))
B = []
B.append(A[2])
B.append(A[0])
B.append(A[1])
print(B[0],B[1],B[2])
Buggy code:
x, y, z = [int(i) for i in input().split()]
print(y, z, x)

Fixed code:
x, y, z = [int(i) for i in input().split()]
print(z, x, y)
Buggy code:
x, y, z = map(int, input().split())
print(z, y, y)

Fixed code:
x, y, z = map(int, input().split())

y, x = x, y
z, x = x, z

print(x, y, z)
Buggy code:
X,Y,Z=map(int,input().split())
print(str(Y)+" "+str(Z)+" "+str(X))

Fixed code:
X,Y,Z = map(int, input().split())

print(str(Z) + " " + str(X) + " " + str(Y))
Buggy code:
x,y,z=(map(int,input().split())

print("{} {}".format(z,x,y))

Fixed code:
x,y,z=map(int,input().split())
print(z,x,y)
#print("{} {}".format(z,x,y))
Buggy code:
x,y,z=(map(int,input().split())

print(z,x,y)

Fixed code:


x, y, z= map(int, input().split())

print(z, x, y)
Buggy code:
X,Y,Z=map(int,input().split())
print("Z X Y")

Fixed code:
X,Y,Z =  map(int,input().split())
print(Z,X,Y)
Buggy code:
base = input().split()
print(base[2],base[1],base[0])

Fixed code:
base = input().split()
print(int(base[2]),int(base[0]),int(base[1]))
Buggy code:
li = list(map(int,input().split()))
s = li[0]
li[0] = li[2]
li[2] = s
print(li[0],li[1],li[2])

Fixed code:
li = list(map(int,input().split()))
s = li[0]
li[0] = li[1]
li[1] = s
s = li[0]
li[0] = li[2]
li[2] = s
print(li[0],li[1],li[2])
Buggy code:
def main():
    x,y,z = map(int, input().split())
    print(z,y,y)


if __name__ == '__main__':
    main()


Fixed code:
def main():
    x,y,z = map(int, input().split())
    print(z,x,y)


if __name__ == '__main__':
    main()
Buggy code:
X,Y,Z=map(int,input().split(" "))

print(Z,Y,X)


Fixed code:
X,Y,Z=map(int,input().split(" "))

print(Z,X,Y)
Buggy code:
 x,y,z=map(int, input().split)
 print(z,x,y)

Fixed code:
x, y, z = input().split()
x, y, z = int(x), int(y), int(z)

print(z, x, y)
Buggy code:
# -*- coding: utf-8 -*-
import numpy as np

x, y, z = map(int, input().split())

a = y
b = x
c = z
a = c
c = a

print(a, b, c)


Fixed code:
# -*- coding: utf-8 -*-
import numpy as np

x, y, z = map(int, input().split())

a = y
b = x
c = z
c = a
a = z
print(a, b, c)
Buggy code:
A,B,C=[int(x) for x in input().split(" ")]
temp=B
B=A
A=C
C=temp
print(A , B , c)


Fixed code:
A,B,C=[int(x) for x in input().split(" ")]
temp=B
B=A
A=C
C=temp
print(A , B , C)
Buggy code:
X,Y,Z = [int(i) for i in input().split()]
print(Y,Z,X)

Fixed code:
X,Y,Z = [int(i) for i in input().split()]
print(Z,X,Y)
Buggy code:
X,Y,Z = list(map(int, input().split(" ")))
print(Z + " " + X + " " + Y)


Fixed code:
X,Y,Z = list(map(int, input().split(" ")))
print(str(Z) + " " + str(X) + " " + str(Y))
Buggy code:
x, y ,z = map(int,input().split())

print(z, y, x)

Fixed code:
x, y ,z = map(int,input().split())
 
print(z, x, y)
Buggy code:
a,b,c = map(int,input().split())
print("{} {} {}".format(b,a,c))
print("{} {} {}".format(c,b,a))

Fixed code:
a,b,c = map(int,input().split())
print("{} {} {}".format(c,a,b))
Buggy code:
def main():
	a,b,c = [int(x) for x in input().split()]
    a, b = b, a
    a, c = c, a
  	print(a, b, c)

main()

Fixed code:
def main():
	a,b,c = [int(x) for x in input().split()]
	a, b = b, a
	a, c = c, a
	print(a, b, c)
    
main()
Buggy code:
X,Y,Z=map(int,input().split())

print(Z,X,Y)X,Y,Z=map(int,input().split())

print(Z,X,Y)

Fixed code:
X, Y, Z = map(int, input().split())
# Z X Y
print(Z,X,Y)
Buggy code:
a = list(map(int,input().split()))
a[0], a[1] = a[1], a[0]
a[0], a[2] = a[2], a[0]
print(a)

Fixed code:
a = list(map(int,input().split()))
a[0], a[1] = a[1], a[0]
a[0], a[2] = a[2], a[0]
print(a[0], a[1], a[2])
Buggy code:
x, y, z = map(int, input().split())

tmp = z
y = x
z = y
x = tmp

print(x, y, z)


Fixed code:
x, y, z = map(int, input().split())
y, x = x, y
z, x = x, z
print(x, y, z)
Buggy code:
ans = list(map(int,input().split()))
print(ans[2],ans[1],ans[0])


Fixed code:
ans = list(map(int,input().split()))
print(ans[2],ans[0],ans[1])
Buggy code:
box = list(map(int,input().split()))
box.reverse()
print("%d %d %d"%(box[0],box[1],box[2]))

Fixed code:
box = list(map(int,input().split()))
print("%d %d %d"%(box[2],box[0],box[1]))
Buggy code:
import sys

a = list(map(int, input().split()))

b = [a[2], a[0], a[1]]

print(b)


Fixed code:
import sys

a = list(map(int, input().split()))

b = [a[2], a[0], a[1]]

print(b[0], b[1], b[2])
Buggy code:
X,Y,Z = list(map(int,input().split()))
print(Y,Z,X)

Fixed code:
X,Y,Z = list(map(int,input().split()))
print(Z,X,Y)
Buggy code:
x, y, z = (int(i) for i in input().split())
a,b = y,x
a,c = c,a
print(a,b,c," ")


Fixed code:
x, y, z = (int(i) for i in input().split())
a,b = y,x
a,c = z,a
print(a,b,c," ")
Buggy code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

X,Y,Z = map(int, readline())

A,B,C = Z,X,Y

print(A,B,C)

Fixed code:
import sys
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
X,Y,Z = map(int, readline().split())
 
A,B,C = Z,X,Y
 
print(A,B,C)
Buggy code:
x,y,z = map(int, input().split())

print(y,z,x)

Fixed code:
x,y,z = list(map(int,input().split()))
print(z,x,y)
Buggy code:
a,b,c = map(int, input().split())

tmp = a
a = b
b = tmp

tmp = a
a = c
c = a

print("{} {} {}".format(a,b,c))

Fixed code:
a,b,c = map(int, input().split())

tmp = a
a = b
b = tmp

tmp = a
a = c
c = tmp

print("{} {} {}".format(a,b,c))
Buggy code:
a,b,c = map(int, input().split())
print(c,b,a)

Fixed code:
a,b,c = map(int, input().split())
print(c, a, b)
Buggy code:
# -*- coding: utf-8 -*-
BOX = list(map(int, input().split()))
print([BOX[2], BOX[0], BOX[1]])

Fixed code:
# -*- coding: utf-8 -*-
BOX = list(map(int, input().split()))
print(BOX[2], BOX[0], BOX[1])
Buggy code:
a, b, c = map(int,input().split())

print(b,a,c)
print(c,b,a)


Fixed code:
a, b, c = map(int,input().split())

a, b, c = b, a, c
a, b, c = c, b, a

print(a, b, c)
Buggy code:
x,y,z = list(map(int,input().split()))
 
def swap(a,b):
    temp = a
    a = b
    b = tmp
    return (a,b)
 
x,y = swap(x,y)
x, z = swap(x, z)
print(x,y,z)

Fixed code:
x,y,z = list(map(int,input().split()))
 
def swap(a,b):
    tmp = a
    a = b
    b = tmp
    return (a,b)
x,y = swap(x,y)
x,z = swap(x, z)
print(x,y,z)
Buggy code:
x,y,z=map(int,input().split())
x,y,z=y,x,z
print(x,y,z)

Fixed code:
x,y,z=map(int,input().split())
x,y,z=z,x,y
print(x,y,z)
Buggy code:
a, b, c = (int, input().split())
print(c, a, b)

Fixed code:
a, b, c = map(int, input().split())
print(c, a, b)
Buggy code:
import sys
import math
import bisect

def main():
    a, b, c = map(int, input().split())
    #a, b = (b, a)
    a, b = b, a
    b, c = c, b
    print('%d %d %d' % (a, b, c))

if __name__ == "__main__":
    main()


Fixed code:
import sys
import math
import bisect

def main():
    a, b, c = map(int, input().split())
    #a, b = (b, a)
    a, b = b, a
    a, c = c, a
    print('%d %d %d' % (a, b, c))

if __name__ == "__main__":
    main()
Buggy code:
a,b,c = map(int,input().split())
print(str(c)+str(a)+str(b))

Fixed code:
a,b,c = map(int,input().split())
print(str(c)+' '+str(a)+' '+str(b))
Buggy code:
X,Y,Z = map(int, input().split())
print(X,Y,Z)

Fixed code:


X,Y,Z = list(map(int, input().split()))

print(Z,X,Y)
Buggy code:
x, y, z = map(int, input().split())
print(z + " " + x + " " + y)


Fixed code:
x,y,z = map(int, input().split())
print(str(z) + ' ' + str(x) + ' ' + str(y))
Buggy code:
X, Y, Z = map(int, input().split())
print(Z, Y, X)

Fixed code:
X, Y, Z = list(map(int, input().split()))
Y, X = X, Y
Z, X = X, Z

print(X, Y, Z)
Buggy code:
x,y,z=map(int,input().split())
print(z x y)

Fixed code:
x, y, z =map(int, input().split())
print(z, x, y)
Buggy code:
x, y, z = map(str, input().split())
print(y + " " + z + " " + x)

Fixed code:
x,y,z=map(int,input().split())
print(str(z)+' '+str(x)+' '+str(y))
Buggy code:
A,B,C = map(int, input().split())
print('{}{}{}'.format(C,A,B))

Fixed code:
A,B,C = map(int, input().split())
print('{} {} {}'.format(C,A,B))
Buggy code:
a, b, c = map(int, input())

print("{} {} {}".format(c, a, b))

Fixed code:
a, b, c = map(int, input().split())
 
print("{} {} {}".format(c, a, b))
Buggy code:
a,b,c=map(int,input().split())
a=c
b=a
c=b
print(a,b,c)

Fixed code:
a,b,c = map(int,input().split())

a,b = b,a
a,c = c,a

print(a,b,c)
Buggy code:
a, b, c = map(int, input().split())

d = c
c = b 
b = d
d = a
 
print(a,b,c)

Fixed code:
a, b, c = map(int, input().split())

d = c
c = b 
b = a
a = d
 
print(a,b,c)
Buggy code:
x,y,z = map(int,input().split())
print(z,y,x,end=' ')

Fixed code:
x,y,z = map(int,input().split())
print(z,end=' ')
print(x,end=' ')
print(y)
Buggy code:
X,Y,Z = map(int,input().split())
X = Z
Y = X
Z = Y
print(X,Y,Z)

Fixed code:
X,Y,Z=map(int,input().split())
print (Z,X,Y)
Buggy code:
X, Y, Z = map(int,input().split())
print(*[Y, Z, X])

Fixed code:
X, Y, Z = map(int,input().split())
print(*[Z, X, Y])
Buggy code:
list1 = list(map(int, input().split()))
list2= []
list2[0] = list1[2]
list2[1] = list1[0]
list2[2] = list1[1]
print(list2)

Fixed code:
list1 = list(map(int, input().split()))
list2= []
list2.append(list1[2])
list2.append(list1[0])
list2.append(list1[1])
print(list2[0], list2[1], list2[2])
Buggy code:
x,y,z=map(int,input().split())

print(y,z,x)

Fixed code:
x,y,z=map(int,input().split())

print(z,x,y)
Buggy code:
X,Y,Z = map(int,input().split())

print("{} {} {} .format(Y,Z,X)")



Fixed code:
X,Y,Z = map(int,input().split())
 
print('{} {} {} '.format(Z,X,Y))
Buggy code:
X,Y,Z = map(int,input().split())
 
print(Y Z X)

Fixed code:
X,Y,Z=map(int,input().split())


print(int(Z),int(X),int(Y))
Buggy code:
a,b,c = map(int,input().split())
list = [c,a,b]
print(list)

Fixed code:
a,b,c = map(int,input().split())
list = [c,a,b]
print(*list)
Buggy code:
a = list(map(int,input().split()))
a[0], a[1] = a[1], a[0]
a[0], a[2] = a[2], a[0]

print(a)

Fixed code:
a = list(map(int,input().split()))
a[0], a[1] = a[1], a[0]
a[0], a[2] = a[2], a[0]
 
print(a[0], a[1], a[2])
Buggy code:
X, Y, Z =map(int, input().split())


X, Y = Y, X
Y, Z = Z, Y
print(X, Y, Z)

Fixed code:
X, Y, Z = list(map(int, input().split()))
X, Y = Y, X
X, Z = Z, X
print(X,Y,Z)
Buggy code:

first_input = map(lambda x:int(x), input().split(" "))
#second_input = input()

print(str(first_input[2])+" "+str(first_input[0])+" "+str(first_input[1]))


Fixed code:

first_input = list(map(lambda x:int(x), input().split(" ")))
#second_input = input()

print(str(first_input[2])+" "+str(first_input[0])+" "+str(first_input[1]))
Buggy code:
from sys import *
a,b,c = map(int,input.split())
print(c, a, b)


Fixed code:
from sys import *
a,b,c = map(int,input().split())
print(c, a, b)
Buggy code:
X, Y, Z = map(int, input().split())
X, Y, Z = Z, Y, X
print(X, Y, Z)

Fixed code:
X,Y,Z = map(int,(input().split()))
print(Z,X,Y)
Buggy code:
#

import sys
input=sys.stdin.readline

def main():
    x,y,z=map(int.input().split())
    print(z,x,y)
    
    
    
if __name__=="__main__":
    main()


Fixed code:
#

import sys
input=sys.stdin.readline

def main():
    x,y,z=map(int,input().split())
    print(z,x,y)
    
    
    
if __name__=="__main__":
    main()
Buggy code:
array = list(map(int, input().split()))
tmp = array[0]
array[0] = array[2]
array[2] = tmp

tmp = array[0]
array[0] = array[1]
array[1] = tmp

print("%d %d %d" %(array[0], array[1], array[2]))

Fixed code:
array = list(map(int, input().split()))

tmp = array[0]
array[0] = array[1]
array[1] = tmp

tmp = array[0]
array[0] = array[2]
array[2] = tmp


print("%d %d %d" %(array[0], array[1], array[2]))
Buggy code:
x,y,z = map(int, input().split())
x,y = y,x
x,z = z,x
print("{} {} {}",x,y,z)

Fixed code:
x,y,z = map(int,input().split())
x,y = y,x
x,z = z,x
print("{} {} {}".format(x,y,z))
Buggy code:
a=list(map(int,input().split()))
b=[]
b.append(a[2])
b.append(a[0])
b.append(b[1])
for i in range(len(b)):
    print(str(b[i])+' ',end='')
print()

Fixed code:
a=list(map(int,input().split()))
b=[]
b.append(a[2])
b.append(a[0])
b.append(a[1])
for i in range(len(b)):
    print(str(b[i])+' ',end='')
print()
Buggy code:
X,Y,Z=map(int,input().split())
print(str(Z)+" "+str(Y)+" "+str(X))

Fixed code:
X,Y,Z = map(int,input().split())

print(str(Z)+' '+str(X)+' '+str(Y))
Buggy code:
x, y, z = map(int, input().split())
print("z", "x", "y")

Fixed code:
x,y,z = map(int, input().split( ))
print(z,x,y)
Buggy code:
A = list(map(int,input().split()))
print(A[2]+" "+A[0]+" "+A[1])

Fixed code:
A = list(map(int,input().split()))
print(str(A[2])+" "+str(A[0])+" "+str(A[1]))
Buggy code:
x,y,z=list(map(int,input(),split()))

print(z,x,y)


Fixed code:
x,y,z=list(map(int,input().split()))

print(z,x,y)
Buggy code:
from sys import stdin
a,b,c = map(int,input().split())
print("{} {} {}".format(c,b,a)

Fixed code:
from sys import stdin
a,b,c = map(int,input().split())
print("{} {} {}".format(c,a,b))
Buggy code:
a,b,c=map(int,input().split())
temp=a
a=b
b=temp
tamp=a
a=c
c=tamp


Fixed code:
a,b,c=map(int,input().split())
temp=a
a=b
b=temp
tamp=a
a=c
c=tamp
print(a,b,c)
Buggy code:
c, a, b = map(int, input().split())
print(a, b, c)

Fixed code:
a,b,c = map(int, input().split())
print (c , a , b)
Buggy code:
s = list(map(int, input().split()))
c = s[-1]
s.pop(-1)
s.insert(0,c)
print(s)

Fixed code:
s = list(map(int, input().split()))
c = s[-1]
s.pop(-1)
s.insert(0,c)
print(*s)
Buggy code:
l = list(input().split())
l[0] = int(l[0])
l[1] = int(l[1])
l[2] = int(l[2])
l[0], l[1]=l[1], l[0]
l[0], l[2]=l[2], l[0]
print(l)

Fixed code:
l = list(input().split())
l[0] = int(l[0])
l[1] = int(l[1])
l[2] = int(l[2])
l[0], l[1]=l[1], l[0]
l[0], l[2]=l[2], l[0]
print(l[0], l[1], l[2])
Buggy code:
A,B,C = map(int, input().split())
tmp = A
A = B
B = tmp

tmp = A
A = C
C = tmp

print(A, end="")
print(B, end="")
print(C, end="")

Fixed code:
A,B,C = map(int, input().split())
tmp = A
A = B
B = tmp

tmp = A
A = C
C = tmp

print(A, end=" ")
print(B, end=" ")
print(C, end=" ")