Problem:


Score : 100 points

Problem Statement

We have three boxes A, B, and C, each of which contains an integer.

Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.

We will now do the operations below in order. Find the content of each box afterward.  

Swap the contents of the boxes A and B

Swap the contents of the boxes A and C

Constraints

1 \leq X,Y,Z \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y Z

Output

Print the integers contained in the boxes A, B, and C, in this order, with space in between.

Sample Input 1

1 2 3

Sample Output 1

3 1 2

After the contents of the boxes A and B are swapped, A, B, and C contain 2, 1, and 3, respectively.

Then, after the contents of A and C are swapped, A, B, and C contain 3, 1, and 2, respectively.  

Sample Input 2

100 100 100

Sample Output 2

100 100 100

Sample Input 3

41 59 31

Sample Output 3

31 41 59



Sample input:
1 2 3


Sample output:
3 1 2

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum = sum(A)
A2 = sorted(A,reverse=True)
Judge = 0
for i in range(N):
    if(A2[i]>(sum/(4*M))):
        Judge = Judge+1
if Judge<M:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:

def resolve():
    import sys
    input = sys.stdin.readline
    k = int(input().rstrip())

    if k <= 9:
        # print(k)
        sys.exit()

    def judge(number_list, index, total):
        if index == len(number_list) - 2:  # 最後から2番目の桁
            num = number_list[index]
            add_num = 2 if num in (0, 9) else 3
            if (total + add_num) < k:
                total += add_num
                return total
            else:
                if num == 0:
                    right_nums = [num, num + 1]
                elif num == 9:
                    right_nums = [num-1,num]
                else:
                    right_nums = [num-1,num,num+1]
                number_list[-1] = right_nums[k-total-1]
                # print("".join(number_list))
                print(*number_list,sep="")
                sys.exit()
        else:  # 最後から２番目の桁じゃない
            num = number_list[index]
            if num == 0:
                right_nums = [num, num + 1]
            elif num == 9:
                right_nums = [num - 1, num]
            else:
                right_nums = [num - 1, num, num + 1]

            for right_num in right_nums:
                number_list[index+1] = right_num
                total = judge(number_list, index+1, total)
            return total

    total = 9
    num_list = [9]
    while True:
        num_list = [0 for _ in range(len(num_list)+1)]
        for left in [1,2,3,4,5,6,7,8,9]:
            num_list[0] = left
            # print(num_list, 0, total)
            total = judge(num_list, 0, total)




if __name__ == "__main__":
    resolve()

Submission status: Runtime Error

Solution code:
N, M = input().split()
A = 0.25
B = (0.25 / int(M))

C = map(int, input().split())
D = B * sum(C)



E = sum(x > int(D) for x in C)
print(E)

Submission status: Runtime Error

Solution code:
K = int(input())

def isRunRun(X):
    x = str(X)
    sa = 0
    for i in range(len(x)-1):
        if abs(int(x[i]) - int(x[i+1])) > 1:
            return False
    return True

if K > 23527:
    num = 99999999
    count = 23527
elif K > 10000:
    num = 22111101
    count = 10000
elif K > 5000:
    num = 110111
    count = 1000
else:
    num = 1
    count = 0

while count < K:
    if isRunRun(num):
        count += 1
    num += 1

print(num-1)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**6)
MOD = 1000000007

k = int(input())
number = 9

ans = 0
for i in range(10,10**6):
    check = 'OK'
    l = len(str(i))
    keta = list(str(i))
    for j in range(l-1):
        if abs(int(keta[j]) - int(keta[j+1])) <= 1:
            pass
        else:
            check = 'NG'
    if check == 'OK':
        number += 1
        if number == k:
            ans = i%MOD
            break
if k <= 9:
    print(k)
else:
    print(ans%MOD)

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum = sum(A)
A2 = sorted(A,reverse=True)
Judge = 0
for i in range(N):
    if(A2[i]>(sum/(4*M))):
        Judge = Judge+1
if Judge>=M:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n,m=map(int,input())
N=n
x=0
z=m
for i in range(100):
    x=N-z
    x=abs(x)
    z=x*z
    N=min(N,x,n)

print(N)

Submission status: Runtime Error

Solution code:
N, K=map(int, input().split())
nums=list()
nums.append(N)
 
while abs(N-K)<N:
    N=abs(N-K)
    nums.append(N)
print(min(nums))

Submission status: Runtime Error

Solution code:
N = int(input())


def make_divisors(n):
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            yield i
            if i != n // i:
                yield n // i


ans = len(tuple(make_divisors(N - 1))) - 1

it = make_divisors(N)
next(it)

for k in it:
    tmp = N
    while not tmp % k:
        tmp //= k
    if tmp % k == 1:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
N, K=map(int, input().split())
nums=list()
nums.append(N)

while abs(N-K)<N:
    N=abs(N-K)
    nums.append(N)
print(min(nums))

Submission status: Runtime Error

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


if N == 0:
    print(N)

initialK = K

if N <= initialK/2:
    print(N)
while True:
    K = N%K
    if K <= initialK/2:
        print(K)
        break

Submission status: Runtime Error

Solution code:
K = int(input())

def isRunRun(X):
    x = str(X)
    sa = 0
    for i in range(len(x)-1):
        if abs(int(x[i]) - int(x[i+1])) > 1:
            return False
    return True

if K > 10000:
    num = 22111101
    count = 10000
elif K > 5000:
    num = 110111
    count = 1000
else:
    num = 1
    count = 0

while count < K:
    if isRunRun(num):
        count += 1
    num += 1

print(num-1)

Submission status: Runtime Error

Solution code:
r_l = [1,2,3,4,5,6,7,8,9,10,11,12,21,22,23,32,33,34,43,44,45,54,55,56,65,66,67,76,77,78,87,88,89,98,99,100,101,110,111,112,113,121,122,123,210,211,212,221,222,223,232,233,234]
N = int(input())
print(r_l[N-1])

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
a_list =  list(map(int, input().split()))
a_list.sort(reverse = True)
a_total = sum(a_list)
count = 0
for voted in a_list[:M]:
  if voted < (1/(4*M))*a_total:
    print("No")
    break
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
x,y,z = map(int, input().split())
x,y,z >= 1 && <= 100 
print(z,y,x)

Submission status: Runtime Error

Solution code:
num1 = int(input().split())
num2 = list(map(int, input().split())    
            
num2 = sorted(num2, reverse=True)
           
N=num1[0]
M=num1[1]
A=num2[M-1]

if A<N/M/4:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
K = int(input())

def isRunRun(X):
    x = str(X)
    sa = 0
    for i in range(len(x)-1):
        if abs(int(x[i]) - int(x[i+1])) > 1:
            return False
    return True


if K < 1000:
    num = 1
    count = 0
elif K < 5000:
    num = 110111
    count = 1000
elif K < 10000:
    num = 22111101
    count = 10000


while count < K:
    if isRunRun(num):
        count += 1
    num += 1

print(num-1)

Submission status: Runtime Error

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


if N == 0:
    print(N)

initialK = K
while True:
    if N <= initialK/2:
        print(N)
        break
    K = N%K
    if K <= initialK/2:
        print(K)
        break

Submission status: Runtime Error

Solution code:
k = int(input())
i = 1 #数回す用
c = 0 #ルンルン数カウント

if k > 13000:
    i = 34454557
    c = 13000

while c < k:
  j = str(i)
  if i < 13: #13未満なら
    c = c + 1 #ルンルン数
    #print(c, i)
  else: #それ以外なら
    x = 0
    for n in range(len(j)-1): #ルンルン数判定を行う
      if abs(int(j[n]) - int(j[n+1])) > 1:#桁の差が1より大きかったら
        x = 1
        break
    if x == 0:
      c = c + 1
      #print(c, i)
  i = i + 1 #iに1を足す

print(i-1)

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()

d = a
a = b
b = d

d = a
a = c
c = d

print(a, b, c)

Submission status: Runtime Error

Solution code:
X,Y,Z=(int,input().split())
1<=X,Y,Z<=100
X,Y=Y,X
Y,Z=Z,Y

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
b = 0
if X == 1:
  print(0)
else:
  while b <= N: 
    N = abs(N - X)
    b = abs(N - X)
  print(N)

Submission status: Runtime Error

Solution code:
X,Y,Z=(int,input())
1<=X,Y,Z<=100
X,Y=Y,X
Y,Z=Z,Y

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
aaa = list(map(int,input().split()))

aaa.sort(reverse=True)
result = [0]*b
for i in range(b):
    h = aaa[i]
    j = sum(aaa) / (4*b)

    if h >= j:
        result[i] = 1
    else:
        result[i] = 0

if result.count(1) >= b:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Submission status: Runtime Error

Solution code:
num1 = int(input("Enter First Number: "))
num2 = int(input("Enter Second Number: "))
 
print("Enter which operation would you like to perform?")
ch = input("Enter any of these char for specific operation +,-,*,/: ")
 
result = 0
if ch == '+':
    result = num1 + num2
elif ch == '-':
    result = num1 - num2
elif ch == '*':
    result = num1 * num2
elif ch == '/':
    result = num1 / num2

Submission status: Runtime Error

Solution code:
num1 = int(input("Enter First Number: "))
num2 = int(input("Enter Second Number: "))
 
print("Enter which operation would you like to perform?")
ch = input("Enter any of these char for specific operation +,-,*,/: ")
 
result = 0
if ch == '+':
    result = num1 + num2
elif ch == '-':
    result = num1 - num2
elif ch == '*':
    result = num1 * num2
elif ch == '/':

Submission status: Runtime Error

Solution code:
X=int(input('A')
Y=int(input('B')
Z=int(input('C')
1<=X,Y,Z<=100
A,B=B,A
A,C=C,A

Submission status: Runtime Error

Solution code:
K = int(input())
ans = []
i = 1

while len(ans) < K :
  l = len(str(i)) - 1
  que = 'yes'
  for k in range(l):
    a = str(i)
    if abs( int(a[k])- int(a[k+1]) ) >= 2:
      que = 'no'
      break

  if que == 'yes':
    ans = ans + [i]


  i +=1

print(i)

Submission status: Runtime Error

Solution code:
number = {"A": int(X), "B": int(Y), "C":int(Z)}
1 <= number <= 100
number["A"] = int(Y)
number["A"] = int(Z)
print(number["A"] + " " + number["B"] + " " + number["C"])

Submission status: Runtime Error

Solution code:
m,n = (int(x) for x in input().split())
list = (input().split())
for i in range(len(list)):
  list[i] = int(list[i])
  
la = sorted(list, reverse=True)

sum = 0
for i in range(len(list)):
  sum += int(list[i])
if int(la[n-1])<sum/(4*m):
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
items,select = input().split()
x = [int(items) for x in input().split()]
for u in x:
    if u > (1 / (4 * int(select))*sum(x)):
        print("No")
        break
    else:
        print("Yes")
        break

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
print(map(C, A, B)

Submission status: Runtime Error

Solution code:
n, k = [int(x) for x in input().split()]

while n > abs(n-k):
    n = abs(n-k)
    if k == 1:
        n = 0
        break
    elif n%k == 0:
        n = 0
        break


print(n)

Submission status: Runtime Error

Solution code:
x = input()
y = input()
z = input()
temp = y
y = x
x = z
z = temp
print(x,y,z)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,m=list(map(int,input().split()))
a=list(map(int,input().split()))
a.sort(reverse=True)

cnt=0
for j in range(n):
    cnt+=a[j]

b=[]
for i in range(n):
    if a[i]>(cnt*(1/(4*m))):
        b.append(a[i])

if len(b) > m:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
z = int(input())

def swap(a,b):
  temp = a
  a = b
  b = temp
  return(a,b)

x,y = swap(x,y)
x,z = swap(x,z)
print(x,y,z)

Submission status: Runtime Error

Solution code:
X,Y,Z=map(int,input())
print(str(Z) + " " + str(X) + " " + str(Y))

Submission status: Runtime Error

Solution code:
A = int(input("X=?"))
B = int(input("Y=?"))
C = int(input("Z=?"))
x = A
A = B
B = x
x = A
A = C
C = x

print(' '.join(map(str, [A,B,C])))

Submission status: Runtime Error

Solution code:
from sys import stdin
N,M = map(int,input().split())
A=  [int(x) for x in stdin.readline().rstrip().split()]
m = max(A)
s = sum(A)
if ( s / (4 * M) < m :
  print("no")
else:  
  print("yes")

Submission status: Runtime Error

Solution code:
X = int(input())
Y = int(input())
Z = int(input())
r = X
X = Y
Y = r
r = X
X = Z
Z = r
print(X,Y,Z)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
N = abs(N - K)
if N // 10 == 0:
    while N > 100:
        N = N / 100
while N > 0:
    N = (N - K) 
print(abs(N))

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
if N%K==0:
    print(0)
    exit()
if N<K:
    print(N)
    exit()
ans=N%K
if ans>=abs(ans-K):
    print(abs(ans-K))
else:
    print(ans)

Submission status: Runtime Error

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


if N < K:
    print(N)
else:
    N = abs(N - (N // K + 1) * K)
    if abs(N-K) <= N:
        print(abs(N-K))
    else:
        print(N)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
from typing import *

# def solve(X: int, Y: int, Z: int) -> Any:
def solve(x, y, z):
    x, y = y, x
    x, z = z, x
    return x, y, z

# generated by online-judge-template-generator (https://github.com/kmyk/online-judge-template-generator)
def main():
    X, Y, Z = map(int, input().split())
    ans = solve(X, Y, Z)
    print(*ans)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
k = int(input())
 
lunlun = []
 
end = False
while True:
    val = 0
    while True:
        val += 1
        val_list = [int(x) for x in list(str(val))]
        is_lun = True 
        for x in range(len(val_list) - 1):
            if abs(val_list[x] - val_list[x + 1]) <= 1:
                continue
            else:
                is_lun = False
        if is_lun:
            lunlun.append(val)
        else:
            continue
        if len(lunlun) == k:
            end = True
            break
    if end:
        break
 
print(lunlun[k - 1])

Submission status: Runtime Error

Solution code:
N,M=map(int,input().split())
list_A=input().split()
for i in range(len(list_A)):
    list_A[i]=int(list_A[i])
A =int(sum(list_A)/(4*M))
if M<len([i for i in list_A if i> A]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
arr = map(int, input().split())
print(arr[2], arr[0], arr[1])

Submission status: Runtime Error

Solution code:
import fractions
N, K = map(int,input().split())
N = fractions.gcd(N,K)
min = N
for i in range(10**8):
    N = abs(N-K)
    if min > N:
        min = N
    if N == 0:
        min = 0
        break
print(min)

Submission status: Runtime Error

Solution code:
code = '9876543210000000000'
def judge(n):
    n = str(n)
    for i in range(len(n)-1):
        ni = int(n[i])
        if abs((ni) - int(n[i+1])) > 1:
            if ni==9:

                return int(n[:i]+code[:len(n)-i])
            else:
                idx = 8 - ni
                return int(n[:i]+code[idx:idx+len(n)-i])
    return -1


i = 1
cnt = 0
k = int(input())
while(1):
    j = judge(i)
    if j==-1:
        cnt += 1

        i+=1
    else:
        i = j
    if cnt == k:
        print(i-1)
        exit()

Submission status: Runtime Error

Solution code:
N=int(input())
K=int(input())
l=abs(N//K)
p=K*l
for i in range(1,10000):
	if abs(N-(K*(l+1)))<abs(N-p):
		p=p+1
print(abs(N-p))

Submission status: Runtime Error

Solution code:
A=X
B=Y
C=Z
X,Y,Z=int()
1<=X,Y,Z<=100
X,Y=Y,X
Y,Z=Z,Y

Submission status: Runtime Error

Solution code:
li= list(map(int, input().split()))
li.insert(1, li.pop(0))
li.insert(2, li.pop(0))
li.insert(0, li.pop(1))
print(li(0), li(1), li(2))

Submission status: Runtime Error

Solution code:
X, Y, Z = int(input().split())
A = X
B = Y
C = Z
temp = A
A = B
B = temp
temp = A
A = C
C = temp

print(A, B, C);

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
a=n
b=(n//k)
c=n-k*b
d=c-k

  
if abs(c)>abs(d):
    print(str(abs(d)))
else:
    print(str(abs(c)))

Submission status: Runtime Error

Solution code:
A = input("X=?")
B = input("Y=?")
C = input("Z=?")
x = A
A = B
B = x
x = A
A = C
C = x
print(str(A)+" "+str(B)+" "+str(C))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

def resolve():
    import sys
    input = sys.stdin.readline
    n, k = [int(x) for x in input().rstrip().split()]
    n_set = set()
    while n not in n_set:

        n_set.add(n)
        if n == 0:
            break

        n = abs(k-n)
        if k < n:
          n = n - k*(abs(k-n)//k)
        # print(n)
        # print(n_set)

    print(min(n_set))

resolve()

Submission status: Runtime Error

Solution code:
X = int(input())
Y = int(input())
Z = int(input())
A = X
B = Y
C = Z
temp = A
A = B
B = temp
temp = A
A = C
C = temp

print(A, B, C);

Submission status: Runtime Error

Solution code:
a,b = list(map(int,input().split()))
aaa = list(map(int,input().split()))

result = [0]*a
for i in range(a):
    h = aaa[i]
    j = int(sum(aaa) / (4*b))

    if h > j:
        result[i] = 1
    else:
        result[i] = 0

if result.count(1) >= b:
    ans = "yes"
else:
    ans = "no"

print(ans)

Submission status: Runtime Error

Solution code:
X = int(input())
Y = int(input())
Z = int(input())
A = X
B = Y
C = Z
temp = A
A = B
B = temp
print(A, B, C);
temp = A
A = C
C = temp

print(A, B, C);

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
print(C, A, B)

Submission status: Runtime Error

Solution code:
A = input("X=?")
B = input("Y=?")
C = input("Z=?")
x = A
A = B
B = x
x = A
A = C
C = x
print(%d %d %d %(A,B,C))

Submission status: Runtime Error

Solution code:
a = input("enter sth for a: ")
b = input("enter sth for b: ")
c = input("enter sth for c: ")

a1=a
b1 = b
c1= c
a = c1
b = a1
c = b1
print(f"valuse after reverse:{a}")
print(f"valuse after reverse:{b}")
print(f"valuse after reverse:{c}")

Submission status: Runtime Error

Solution code:
#for the user_input 
a = input("enter sth for a: ")
b = input("enter sth for b: ")
c = input("enter sth for c: ")
#create temporary var to keep the user_input
a1=a
b1 = b
c1= c
#set the place for the input after swap
a = c1
b = a1
c = b1
#print out the final output
print(f"valuse after reverse:{a}")
print(f"valuse after reverse:{b}")
print(f"valuse after reverse:{c}")

Submission status: Runtime Error

Solution code:
from fractions import gcd
n,k = map(int,input().split())

def process(a,b):
	flag = True
	while flag:
		a,b = max(a,b),min(a,b)
		a = a%b
		if a == 0:
			flag = False

	for i in range(1000):
		a = min(a,abs(a-b))
	return a
if n == 0:
	print(0)
elif k == 1 or n == 1:
	print(0)
else:
	print(process(n,k))

Submission status: Runtime Error

Solution code:
X = input()
Y = input()
Z = input()
A = X
B = Y
C = Z
# swap the contents of the boxes A and B
temp = B
B = A
A = temp
print(A + " " + B + " " + C)
# swap the contents of the boxes A and C
swapAC = C
C = A
A = swapAC
print(A + " " + B + " " + C)

Submission status: Runtime Error

Solution code:
N,M=map(int,input().split())
a = list(map(int, input().split()))
list.sort(a, reverse=True)

if a[M-1] < sum(a)/(4*M) :
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
A = input("enter number for A: ")
B = input("enter number for B: ")
C = input("enter number for C: ")

a1 = A
b1 = B
c1 = C
a = c1
b = a1
c = b1
print(f"valuse after reverse A = {a}")
print(f"valuse after reverse B= {b}")
print(f"valuse after reverse C= {c}")

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
A = map(int, input().split())

a = sorted(A, reverse=True)

b = a[M-1]
c = sum(a)
d = 4*M
e = c//d

if a[M-1]>e:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a, b, c = int(input().split())
if a >= 1 and a <= 100:
    if b >= 1 and b <= 100:
        if c >= 1 and c <= 100:
            a, b = b, a
            a, c = c, a
print(a, b, c)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
print(a,b,c)

temp = a
a = c
c = b
b = temp 

print(a,b,c)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
print(C, A, B)

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
if K == 1 or N == 0 or N == K:
    print(0)
    exit()
elif K == 0:
    print(N)
    exit()
elif N == 1:
    print(1)
    exit()
else:
    l = []
    ans = N
    for i in range(max(N,K)):
        ans = abs(ans - K)
        l.append(ans)
    print(min(l))

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
item_vote = list(map(int, input().split()))
total_vote = sum(item_vote)
item_vote = sorted(item_vote, reverse=True)
boder = total_vote/4*M
if item_vote[M-1] >= boder:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())

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

print(a, b, c)

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
if K == 1 or N == 0 or N == K:
    print(0)
    exit()
elif K == 0:
    print(N)
    exit()
elif N == 1:
    print(1)
    exit()
else:
    l = []
    ans = N
    for i in range(max(N,K)):
        ans = abs(ans - K)
        l.append(ans)
        if i >= 1:
            if ans in l:
                print(min(l))
                exit()
    print(min(l))

Submission status: Runtime Error

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

def swap(x,y):
  tmp=x
  x=y
  y=temp
  return(x,y)

a,b = swap(a,b)
a,c = swap(a,c)
print(x,b,c)

Submission status: Runtime Error

Solution code:
A=input(int("Enter the number of X"))
B=input(int("Enter the number of Y"))
C=input(int("Enter the number of Z"))
X=C
Y=A
Z=B
print(X)
print(Y)
print(Z)

Submission status: Runtime Error

Solution code:
a, b, c = input().split()
print(f'{c},{a},{b}')

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
item_vote = list(map(int, input().split()))

total_vote = sum(item_vote)
item_vote = sorted(item_vote, reverse=True)
boder = total_vote/4*M
if item_vote[M-1] >= boder:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
if n >= k:
  print(n%k)
 
else:
  print(min(n, abs(k-n)))

Submission status: Runtime Error

Solution code:
a, b, c = input().split()
print(f'{c},{a},{b}')

Submission status: Runtime Error

Solution code:
x, y, z = input().split(" ")
print(f"{z} {x} {y}")

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
while N>=0:
    N=N-K
if abs(N)<abs(N+K):
    print(abs(N))
else:
    print(abs(N+K))

Submission status: Runtime Error

Solution code:
n = [0]*3
for i in range(len(n)):
  while n[i]<1 or 100<n[i]:
    n[i] = int(input())

n[0], n[1] = n[1], n[0]
n[0], n[2] = n[2], n[0]

print(n[0], n[1], n[2])

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().splite())
print(c,a,b)

Submission status: Runtime Error

Solution code:
A,B,C = list(map(int,input().split()))
def swap(x,y):
  tmp=x
  x=y
  y=temp
  return(x,y)
A,B = swap(A,B)
A,C = swap(A,C)
print(X,Y,Z)

Submission status: Runtime Error

Solution code:
x, y, z = input().split(" ")
print( f"{z} {x} {y}")

Submission status: Runtime Error

Solution code:
A,B,C = map= (int, input().split())
print(C,A,B)

Submission status: Runtime Error

Solution code:
X, Y, Z = map(int, input().split())
 
print(Z+" "+X+" "+Y)

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
count=0
for i in range(int(n)):
    if a[i]<sum(a)//(4*int(m)):
        count=count
    else:
        count+=1
if count>=int(m):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a = input().split(' ')
b = input().split(' ')
a = [int(a) for a in a]
b = [int(b) for b in b]

b.sort(reverse=True)
v = sum(b)

ans = 'Yes'

if b[a[1]-1] / v < 1 /( 4 * a[1]):
    ans = 'No'
            
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
li= list(map(int, input().split()))
li.insert(1) = li.pop(0)
li.insert(2) = li.pop(0)
print(li)

Submission status: Runtime Error

Solution code:
A=input(int("Enter the number of X"))
B=input(int("Enter the number of Y"))
C=input(int("Enter the number of Z"))
print(C)
print(A)
print(B)

Submission status: Runtime Error

Solution code:
X = int(input())
Y = int(input())
Z = int(input())
A = X
B = Y
C = Z
temp = X
A = Z
C = Y
B = temp
print(A, B, C);

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
 
toku = sum(a) // (4*m)
 
a.sort(reverse=True)
if a[m-1] >= toku:
  print("Yes")
  else:
  print("No")

Submission status: Runtime Error

Solution code:
a = int(input()), b= int(input()), c=int(input())
print(a, b, c)

Submission status: Runtime Error

Solution code:
array = list(map(int, input().split()))
if (array[0] > array[1]):
  tmp = array[0]
  arrat[0] = array[1]
  array[1] = tmp

if (array[1] > array[2]):
  tmp = array[1]
  arrat[1] = array[2]
  array[2] = tmp

if (array[0] > array[2]):
  tmp = array[0]
  arrat[0] = array[2]
  array[2] = tmp

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

Submission status: Runtime Error

Solution code:
from sys import stdin
main
a,b,c = map(int,input().split())
print("{} {} {}".format(c,b,a))

Submission status: Runtime Error

Solution code:
a,b=input().split()
a=int(a)
b=int(b)
y=[10**18]
f=0
for i in range (10**18):
    x=a-b
    if x<0:
        y.append(x*(-1))
        a=x*(-1)
    else :
        y.append(x)
        a=x
    if y[i]<=y[i+1]:
        f=y[i]
        break

print(f)

Submission status: Runtime Error

Solution code:


X,Y,Z = int(input()), int(input()),int(input())
A = X
B = Y
C = Z
temp = X
A = Z
C = Y
B = temp
print(A, B, C);

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, M = input().split(' ')
lis1 = input().split(' ')
S = sum(lis1)
thresh = S / (4 * M)
lis2 = sorted(lis1)
if lis2[M - 1] < thresh:
  print 'No'
else:
  print 'Yes'

Submission status: Runtime Error

Solution code:
from bisect import bisect_left

N, M = map(int,input().split())
A = list(map(int,input().split()))

#print(M)
A.sort()
#print(A)

limit = sum(A)/(4*M)
#print(limit)

n = bisect_left(A, limit)
#print(N-n-1)
if N-n-1 >= M:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
if A<B and B <C:
    T = A
    A = B
    B = T
    print(A,B,C)
else:
    T1 = A
    A = C
    C = T1
    print(A,B,C)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
box = ['X', 'Y', 'Z']
box[0], box[1] = box[1], box[0]
box[0], box[2] = box[2], box[0]
box_i = [int(s) for s in box]
print(box_i)

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
A = list(map(int,input().split()))
sm = sum(A)
jud = sm/(4*M)

b = 0
for i in A:
    if i > jud:
        b = b+1
if b >= M:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
def calc():
    d = a
    a = b
    b = d

    d = a
    a = c
    c = d

    print(a,b,c)

a, b, c = map(int, input().split())
calc()

Submission status: Runtime Error

Solution code:
import sys
a = sys.argv
print(int(a[2]),end=' ')
print(int(a[0]),end=' ')
print(int(a[1]),end=' ')

Submission status: Runtime Error

Solution code:
X = int(input())
Y = int(input())
Z = int(input())

print(Z,X,Y)

Submission status: Runtime Error

Solution code:
X = int(input())
Y = int(input())
Z = int(input())

A = X
B = Y
C = Z

X, Y = Y, X
Y, Z = Z, Y
print(A, B, C)

Submission status: Runtime Error

Solution code:
s = input().split()
i = s[0]
m = int(s[1])
j = 0
el = input().split()
for p in el:
    if int(p) < 1 / (4 * m):
      j = 1 
if j == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

print(z+""+x+""+y)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
if a >= 1 and a <= 100:
    if b >= 1 and b <= 100:
        if c >= 1 and c <= 100:
            a, b = b, a
            a, c = c, a
print(a, b, c)

Submission status: Runtime Error

Solution code:
n = [0]*3
for i in range(len(n)):
  n[i] = input()

n[0], n[1] = n[1], n[0]
n[0], n[2] = n[2], n[0]

print(n[0], n[1], n[2])

Submission status: Runtime Error

Solution code:
import sys
a = sys.argv
print(int(a[3]),end=' ')
print(int(a[1]),end=' ')
print(int(a[2]),end=' ')

Submission status: Runtime Error

Solution code:
import sys
N,M = map(int, input().split())
A = list(map(int, input().split()))
sorted_A = sorted(A, reverse=True) 
all_A = sum(A)

rule = (1/(4*M))

ans = 0

for i in A:
    if (i / all_A) > rule:
        ans = ans + 1
    else:
        pass

if ans >= M:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s = input().split()
i = s[0]
m = int(s[1])
j = 0
el = input().split()
for p in el:
    if int(p) < 1 / (4 * m):
      j = 1 
if j == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
, M, *A = map(int, open(0).read().split())
vote = sum(A) / (4*M)
num = list(filter(lambda x: x > vote, A))
num = len(num)
if num >= M:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
x,y,z = int(input()), int(input()),int(input())
temp = x
x = z
z = y
y = temp
print(x, y, z);

Submission status: Runtime Error

Solution code:
X=int(input())
Y=int(input())
Z=int(input())
X ^= Z
Z ^= X
X ^= Z

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input().split()
i = s[0]
m = int(s[1])
j = 0
el = input().split()
for p in el:
    if int(p) < (1 / (4 * m)):
      j = 1 
if j == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()

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

print(a, b, c)

Submission status: Runtime Error

Solution code:
box = [X, Y, Z]
box[0], box[1] = box[1], box[0]
box[0], box[2] = box[2], box[0]
print(box)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
if A<B and B <C:
    T = A
    A = B
    B = T
	print(A,B,C)
else:
    T1 = A
    A = C
    C = T1
    print(A,B,C)