ZhenlongDai/ACPR huggingface dataset:
Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]

total_do=sum(a)-sum(b)
must_do_a=0
must_do_b=0

for i in range(N):
	dist=a[i]-b[i]
	if dist<0:
		dist=-dist
		must_do_a+=int(dist/2)
		if dist%2!=0:
			must_do_b+=1
	elif dist>0:
		must_do_b+=dist

if must_do_a>=must_do_b:
	print("YES")
else:
	print("NO")



Failing test case input:
5
7 2 2 6 11
1 8 3 0 7

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
N=int(input())
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]

total_do=sum(b)-sum(a)
must_do_a=0
must_do_b=0

for i in range(N):
	dist=a[i]-b[i]
	if dist<0:
		dist=-dist
		must_do_a+=int((dist+1)/2)
		if dist%2!=0:
			must_do_b+=1
	elif dist>0:
		must_do_b+=dist
left_a=total_do-must_do_a
left_b=total_do-must_do_b

if total_do>=0 and must_do_a>=must_do_b and left_a*2==left_b:
	print("Yes")
else:
	print("No")

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a= list(map(int,input().split()))
b= list(map(int,input().split()))
a.sort()
b.sort()



if sum(a)>sum(b):
  print("No")
else:
  kachi = [a[i]-b[i] if(a[i]>b[i]) else 0 for i in range(N)]  
  make = [b[i]-a[i] if(b[i]>a[i]) else 0 for i in range(N)]  
  
  
  
  
  if sum(kachi)>0:
    print("No")
  else:
    print("Yes")
    



Failing test case input:
3
0 0 2
0 2 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
a= list(map(int,input().split()))
b= list(map(int,input().split()))
c = [a[i]-b[i] for i in range(N)]
d=sum(b)-sum(a)   
if d<0:
  print("No")
  exit()
  
must=0
cnt=0
for num in c:
  if num>0:
    must += abs(num)
  if num*(-1) >= 2:
    cnt += (-1)*num
if must>d:
  print("No")
  exit()




if cnt<must:
  print("No")
else:
  print("Yes")

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
k = sum(B)-sum(A)


if k < 0:
    print('No')
else:
    cnt = 0
    for a, b in zip(A, B):
        if a < b:
            cnt += (b-a)
        elif b < a:
            cnt += a-b
    if cnt <= k:
        print('Yes')
    else:
        print('No')

Failing test case input:
3
0 -1 0
-1 3 2

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
k = sum(B)-sum(A)


if k < 0:
    print('No')
else:
    cnt_a = 0
    cnt_b = 0
    for a, b in zip(A, B):
        if a < b:
            x, y = divmod((b-a), 2)
            cnt_a += x+y
            cnt_b += y
        elif b < a:
            cnt_b += a-b
    if max(cnt_a, cnt_b) <= k:
        print('Yes')
    else:
        print('No')
Problem: p03438
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):


import math

import itertools
from collections import deque
from collections import Counter
import heapq


import bisect
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
sa=sum(a)
sb=sum(b)
if sb<sa:
    print("No")
else:
    cnt=sb-sa
    resa=0
    resb=0
    for i in range(n):
        if b[i]<a[i]:
            resa+=a[i]-b[i]
        else:
            resb+=math.ceil((b[i]-a[i])/2)
    if resa+resb>cnt:
        print("No")
    else:
        print("Yes")


Failing test case input:
3
1 0 -2
-1 3 2

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):


import math

import itertools
from collections import deque
from collections import Counter
import heapq


import bisect
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
sa=sum(a)
sb=sum(b)
if sb<sa:
    print("No")
else:
    cnt=sb-sa
    resa=0
    resb=0
    for i in range(n):
        if b[i]<a[i]:
            resa+=a[i]-b[i]
        else:
            resb+=math.ceil((b[i]-a[i])/2)
    if resa>cnt or resb>cnt:
        print("No")
    else:
        print("Yes")

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
sum_A = sum(A)
sum_B = sum(B)
cnt1 = sum_B - sum_A
cnt2 = 0
for a, b in zip(A, B):
    if a > b:
        cnt2 += a - b
    elif a < b:
        cnt2 += math.ceil((b - a) / 2)
if cnt1 < cnt2:
    print("No")
else:
    print("Yes")

Failing test case input:
3
0 -1 1
-1 3 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import math
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
sum_A = sum(A)
sum_B = sum(B)
cnt1 = sum_B - sum_A
cnt2 = 0
for a, b in zip(A, B):
    
    
    if a < b:
        cnt2 += math.ceil((b - a) / 2)

if cnt1 >= cnt2:
    print("Yes")
else:
    print("No")

Problem: p03438
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt1=[0]*n
cnt2=[0]*n
for i in range(n):
    if a[i]>b[i]:
        cnt2[i]=a[i]-b[i]
    else:
        num4=b[i]-a[i]
        cnt1[i]=num4
        cnt2[i]=num4%2
num5=abs(sum(a)-sum(b))
if sum(cnt1)<=num5 and sum(cnt2)<=num5:
    print("Yes")
else:
    print("No")


Failing test case input:
3
1 0 -1
-1 3 2

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt1=[0]*n
cnt2=[0]*n
for i in range(n):
    if a[i]>b[i]:
        cnt2[i]=a[i]-b[i]
    else:
        num4=b[i]-a[i]
        cnt1[i]=-(num4
        cnt2[i]=num4%2
num5=abs(sum(a)-sum(b))
if max(sum(cnt1),sum(cnt2))+abs(sum(cnt1)-sum(cnt2))<=num5:
    print("Yes")
else:
    print("No")
Problem: p03438
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt1=[0]*n
cnt2=[0]*n
for i in range(n):
    if a[i]>b[i]:
        cnt2[i]=a[i]-b[i]
    else:
        num4=b[i]-a[i]
        cnt1[i]=num4
        cnt2[i]=num4%2
num5=abs(sum(a)-sum(b))
if max(sum(cnt1),sum(cnt2))+abs(sum(cnt1)-sum(cnt2))<=num5:
    print("Yes")
else:
    print("No")


Failing test case input:
3
1 2 3
5 2 2

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt1=[0]*n
cnt2=[0]*n
for i in range(n):
    if a[i]>b[i]:
        cnt2[i]=a[i]-b[i]
    else:
        num4=b[i]-a[i]
        cnt1[i]=-(num4
        cnt2[i]=num4%2
num5=abs(sum(a)-sum(b))
if max(sum(cnt1),sum(cnt2))+abs(sum(cnt1)-sum(cnt2))<=num5:
    print("Yes")
else:
    print("No")

Problem: p03438
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))

x=sum(b)-sum(a)
y=0
for i in range(n):
    if a[i]<b[i]:
        y+=-(a[i]-b[i])
print("No" if x<=y else "Yes")

Failing test case input:
3
0 0 -1
-1 3 2

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))

x=sum(b)-sum(a)
y=0
for i in range(n):
    if a[i]<b[i]:
        y+=-((a[i]-b[i])
print("No" if x<y else "Yes")

Problem: p03438
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)

def main():
    n = int(input().strip())
    a = list(map(int, input().strip().split()))
    b = list(map(int, input().strip().split()))
    k = sum(b) - sum(a)
    mink = 0
    for i in range(n):
        if a[i] < b[i]:
            mink += (b[i] - a[i] + 1) 
        else:
            mink += a[i] - b[i]
    if mink <= k:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()


Failing test case input:
3
0 -1 0
-1 3 2

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)

def main():
    n = int(input().strip())
    a = list(map(int, input().strip().split()))
    b = list(map(int, input().strip().split()))
    cnt = 0

    k = sum(max(0, a[i]-b[i]) for i in range(n))
    l = sum(max(0, (b[i] - a[i])
    if k <= l:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()
Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

n = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
total = sum(B) - sum(A)
cnt1, cnt2 = 0,0

for i in range(n):
    if A[i] > B[i]:
        cnt1 += A[i] - B[i]
    elif A[i] < B[i]:
        cnt2 += math.floor((B[i]-A[i])/2)

print(total ,cnt1 ,cnt2)
if max(cnt1, cnt2) <= total:
    print('Yes')
else:
    print('No')

Failing test case input:
3
0 0 2
7 2 2

Expected output:
Yes


Actual output:
9 0 4
Yes


Fixed submission (verdict: Accepted):
import math

n = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
total = sum(B) - sum(A)
cnt1, cnt2 = 0,0

for i in range(n):
    if A[i] > B[i]:
        cnt1 += A[i] - B[i]
    elif A[i] < B[i]:
        cnt2 += math.ceil((B[i]-A[i])/2)

if max(cnt1, cnt2) <= total:
    print('Yes')
else:
    print('No')

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input=sys.stdin.readline

def main():
    n=int(input())
    a=list(map(int,input().split()))
    b=list(map(int,input().split()))
    a.sort()
    b.sort()
    
    flag=True
    for i in range(n):
        if a[i]-b[i] <= 0:
            continue
        else:
            flag=False
            break
    
    if flag:
        print('Yes')
    else:
        print('No')   
  
if __name__=='__main__':
    main()

Failing test case input:
3
0 -1 2
-1 2 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
MOD = 10 ** 9 + 7
INF = 10 ** 10
import sys
sys.setrecursionlimit(100000000)
dy = (-1,0,1,0)
dx = (0,1,0,-1)

def main():
    n = int(input())
    a = list(map(int,input().split()))
    b = list(map(int,input().split()))
    x = [i - j for i,j in zip(a,b)]
    
    p = 0
    m = 0
    for num in x:
        if num < 0:
            m += (-num
        else:
            p += num
    
    if 2 * p <= m:
        print('Yes')
    else:
        print('No')

if __name__ =='__main__':
    main()

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
count_a = 0
count_b = 0
for i in range(n):
    count_a += max(0, b[i] - a[i])
    count_b += max(0, a[i] - b[i])
if sum(b) >= sum(a):
    if count_a % 2 == 0:
        print("Yes")
        exit()
print("No")

Failing test case input:
3
0 0 2
-1 2 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
count_a = 0
count_b = 0
for i in range(n):
    count_a += max(0, (b[i] - a[i]) 
    count_b += max(0, a[i] - b[i])
if sum(b) >= sum(a):
    if count_a >= count_b:
        print("Yes")
        exit()
print("No")
Problem: p03438
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt1=[0]*n
cnt2=[0]*n
for i in range(n):
    if a[i]>b[i]:
        cnt2[i]=a[i]-b[i]
    else:
        num4=b[i]-a[i]
        cnt1[i]=num4
        cnt2[i]=num4%2
num5=abs(sum(a)-sum(b))
if max(sum(cnt1),sum(cnt2))+abs(sum(cnt1)-sum(cnt2))==num5:
    print("Yes")
else:
    print("No")


Failing test case input:
3
0 2 3
4 2 2

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt1=[0]*n
cnt2=[0]*n
for i in range(n):
    if a[i]>b[i]:
        cnt2[i]=a[i]-b[i]
    else:
        num4=b[i]-a[i]
        cnt1[i]=-(num4
        cnt2[i]=num4%2
num5=abs(sum(a)-sum(b))
if max(sum(cnt1),sum(cnt2))+abs(sum(cnt1)-sum(cnt2))<=num5:
    print("Yes")
else:
    print("No")

Problem: p03438
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

ans = False
rule1 = sum(a) <= sum(b)
rule2 = sum([ai - bi for ai, bi in zip(a,b) if ai > bi]) <= sum(b) - sum(a)
rule3 = sum([(bi - ai) *2 for ai, bi in zip(a,b) if bi > ai]) <= sum(b) - sum(a)
if rule1 and rule2 and rule3:
  ans = True

text = "Yes" if ans else "No"
print(text)


Failing test case input:
3
1 2 2
5 2 2

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

result = False

big_a = sum([ai - bi for ai, bi in zip(a,b) if ai > bi])
big_b = sum([(bi - ai) 
sum_diff = sum(b) - sum(a)

if big_a <= big_b:
  result = True

ans = "Yes" if result else "No"
print(ans)

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]

c=0
if sum(a)>sum(b):
    print('No')
    exit()
else:
    for i in range(N):
        c+=max(0,a[i]-b[i])
    if c>N:
        print('No')
    else:
        print('Yes')


Failing test case input:
3
0 -2 2
-1 2 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math

N = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

c = 0
d = 0
if sum(a) > sum(b):
    print('No')
else:
    for i in range(N):
        c += max(0, a[i]-b[i])
        d += max(0, (b[i]-a[i])
    if c > d:
        print('No')
    else:
        print('Yes')
Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
dif = list(x-y for x,y in zip(a,b))
cnt = 0
for d in dif:
    if d>0:
        cnt += d*2
    else:
        cnt += d
if cnt < 0:
    print('Yes')
else:
    print('No')


Failing test case input:
3
0 -2 2
0 2 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import math
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
dif = list(x-y for x,y in zip(a,b))
cnt = 0
for d in dif:
    if d>0:
        cnt += d
    else:
        cnt += math.ceil(d/2)
if cnt <= 0:
    print('Yes')
else:
    print('No')

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import math

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

r = 0
q = 0

for x, y in zip(A,B):
    if  x < y:
        r += y - x
    elif x > y:
        q += math.ceil((x - y)/2)

if sum(B) - sum(A) < r + q:
    print("Yes")
else:
    print("No")

Failing test case input:
5
0 3 1 8 2
0 2 1 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys
import math

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

d = [ y - x for x, y in zip(A, B)]

q = [ x 
r = [ -x for x in d if x < 0]

if sum(q) >= sum(r):
    print("Yes")
else:
    print("No")

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

C = [B[i]-A[i] for i in range(N)]

P = sum(filter(lambda x: x<0, C))
M = list(filter(lambda x: x>1, C))
M = list(map(lambda x: x%2, M))
M = sum(M)
if abs(M) <= abs(P):
    print("Yes")
else:
    print("No")





Failing test case input:
3
0 0 -1
-1 3 2

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

C = [B[i]-A[i] for i in range(N)]

P = sum(filter(lambda x: x<0, C))
M = list(filter(lambda x: x>1, C))
M = list(map(lambda x: x

M = sum(M)
if abs(M) >= abs(P):
    print("Yes")
else:
    print("No")

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

sub = [b[i] - a[i] for i in range(N)]
plus = sum([x for x in sub if x > 0])
minus = sum([-x for x in sub if x < 0])
print(sub)

print(('No', 'Yes')[plus - minus * 2 >= 0])


Failing test case input:
5
7 2 2 6 11
1 8 3 0 7

Expected output:
No


Actual output:
[-6, 6, 1, -6, -4]
No


Fixed submission (verdict: Accepted):

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

sub = sorted(b[i] - a[i] for i in range(N))
odd = len([x for x in sub if x > 0 and x % 2 == 1])
plus = sum(x for x in sub if x > 0)
minus = sum(x for x in sub if x < 0)
print(('No', 'Yes')[plus + minus * 2 >= odd])
Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))

d=[]
for i in range(N):
    d.append(a[i]-b[i])

cnt=-sum(d)
p=0
n=0
for j in range(N):
    if d[j]>0:
        p+=d[j]
    if d[j]<0:
        n+=-d[j]
if p<=cnt and n<=cnt:
    print("Yes")
else:
    print("No")

Failing test case input:
3
0 -1 2
-1 3 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))

d=[]
for i in range(N):
    d.append(a[i]-b[i])

cnt=-sum(d)
p=0
n=0
for j in range(N):
    if d[j]>0:
        p+=d[j]
    if d[j]<0:
        n+=-d[j]-(-d[j])%2
if n>=p*2:
    print("Yes")
else:
    print("No")

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
res=0
for i in range(len(a)):
  res+=a[i]-b[i]
if res<=0:
  print('Yes')
else:
  print('No')

Failing test case input:
5
3 2 8 1 7
2 7 1 4 7

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
res=0
for i in range(len(a)):
  tmp=a[i]-b[i]
  if tmp<0:
    tmp+=tmp%2
    tmp=tmp/2
  res+=tmp
if res>0:
  print('No')
else:
  print('Yes')

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import math
if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    factorA = []
    factorB = []
    for index in range(n):
        if a[index] > b[index]:
            factorB.append(a[index]-b[index])
        elif a[index] < b[index]:
            factorA.append(math.ceil((b[index]-a[index])/2))
        else:
            pass
    else:
        num = abs(sum(a)-sum(b))
        if num >= sum(factorA) and num >= sum(factorB):
            print("Yes")
        else:
            print("No")

Failing test case input:
5
1 3 1 8 0
0 2 1 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

import math
if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    factorA = []
    factorB = []
    for index in range(n):
        if a[index] > b[index]:
            factorB.append(a[index]-b[index])
        elif a[index] < b[index]:
            factorA.append((b[index]-a[index])
        else:
            pass
    else:
        if sum(factorA) >= sum(factorB):
            print("Yes")
        else:
            print("No")
Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

sumA = 0
sumB = 0

for i in range(n):
    sumA = A[i] + sumA
    sumB = B[i] + sumB

if sumA < sumB or A ==B:
    print("Yes")
else:
    print("No")


Failing test case input:
3
0 -2 2
-1 2 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

sumA = 0
sumB = 0
sumAB = 0

for i in range(n):
    sumA += A[i]
    sumB += B[i]

for i in range(n):
    if A[i] < B[i]:
        sumAB += int((B[i] - A[i]) / 2 + 0.5)

if sumAB <= sumB - sumA:
    print("Yes")
else:
    print("No")

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
count = - sum(A) + sum(B)
for i in range(N):
  inv = max(0, A[i] - B[i])
  
if count >= 0 and inv <= count:
  print("Yes")
else :
  print("No")

Failing test case input:
5
3 1 8 2 5
2 7 1 8 4

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
count = - sum(A) + sum(B) 
inv = 0
for i in range(N):
  inv += max(0, A[i] - B[i])
  
inv2 = 0
for i in range(N):
  inv2 += max(0, (B[i] - A[i]+1)
  
if count >= 0 and inv <= count and inv2 <= count:
  print("Yes")
else :
  print("No")

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

c = 0
d = 0
if sum(a) > sum(b):
    print('No')
else:
    for i in range(N):
        c += max(0, a[i]-b[i])
        d += max(0, math.ceil((b[i]-a[i])/2))
    if c > d:
        print('No')
    else:
        print('Yes')


Failing test case input:
3
0 0 1
-1 3 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math

N = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

c = 0
d = 0
if sum(a) > sum(b):
    print('No')
else:
    for i in range(N):
        c += max(0, a[i]-b[i])
        d += max(0, (b[i]-a[i])
    if c > d:
        print('No')
    else:
        print('Yes')
Problem: p03438
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)

def main():
    n = int(input().strip())
    a = list(map(int, input().strip().split()))
    b = list(map(int, input().strip().split()))
    k = sum(b) - sum(a)
    mink = 0
    for i in range(n):
        if a[i] < b[i]:
            mink += (b[i] - a[i]) 
        else:
            mink += a[i] - b[i]
    if mink <= k:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()


Failing test case input:
3
0 -1 2
-1 3 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)

def main():
    n = int(input().strip())
    a = list(map(int, input().strip().split()))
    b = list(map(int, input().strip().split()))
    cnt = 0

    k = sum(max(0, a[i]-b[i]) for i in range(n))
    l = sum(max(0, (b[i] - a[i])
    if k <= l:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

C = [A[i]-B[i] for i in range(N)]

P = sum(filter(lambda x: x>0, C))
M = sum(filter(lambda x: x<-1, C))
if abs(M) > abs(2*P):
    print("Yes")
else:
    print("No")





Failing test case input:
3
0 -1 1
-1 3 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

C = [B[i]-A[i] for i in range(N)]

P = sum(filter(lambda x: x<0, C))
M = list(filter(lambda x: x>1, C))
M = list(map(lambda x: x

M = sum(M)
if abs(M) >= abs(P):
    print("Yes")
else:
    print("No")

Problem: p03438
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
sum = 0
for i in range(n):
    if a[i] - b[i] > 0:
        sum += a[i]- b[i]
    else:
        sum += (b[i] - a[i]) 
sum_a = 0
sum_b = 0
for i in range(n):
    sum_a += a.pop(0)
    sum_b += b.pop(0)
if sum <= sum_b - sum_a:
    print ('YES')
else:
    print ('NO')

Failing test case input:
5
3 8 0 8 2
1 2 10 0 0

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
a = a.copy()
b = b.copy()
sum_c = 0
for i in range(n):
    if (a[i] - b[i]) < 0:
        sum_c += int(((b[i] - a[i]) / 2 ) + 0.5)
sum_a = 0
sum_b = 0
for i in range(n):
    sum_a += a.pop(0)
    sum_b += b.pop(0)
if sum_c <= (sum_b - sum_a):
    print ('Yes')
else:
    print ('No')
Problem: p03973
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N=int(input())
A=[int(input()) for _ in range(N)]
max_rem=0
ans=0
for a in A:
    if a >= max_rem+2:
        h = max_rem+1
        c,rem = divmod(a-1, h)
        max_rem = max(max_rem, rem)
        ans += c
    else:
        max_rem = max(max_rem, a)
print(ans)


Failing test case input:
3
36
27
8

Expected output:
51


Actual output:
68


Fixed submission (verdict: Accepted):
N=int(input())
A=[int(input()) for _ in range(N)]
max_rem=0
ans=0
for a in A:
    if a >= max_rem+2:
        h = max_rem+1
        if a%h == 0:
            ans += (a
            if max_rem==0:
                max_rem=1
        else:
            ans += (a
    else:
        max_rem = max(max_rem, a)
print(ans)
Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
ans = x
if x != 0:
    if x <= 6:
        ans += 1
    else:
        ans += 2
print(ans)

Failing test case input:
1835108767

Expected output:
333656140


Actual output:
1835108769


Fixed submission (verdict: Accepted):
x = int(input())
ans = (x
a = x % 11
if a != 0:
    if a <= 6:
        ans += 1
    else:
        ans += 2
print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
q, mod = divmod(x, 11)
if mod == 0:
    print(int(q))
elif mod <= 6:
    print(int(q+1))
else:
    print(int(q+2))

Failing test case input:
11375

Expected output:
2069


Actual output:
1035


Fixed submission (verdict: Accepted):
x = int(input())
q, mod = divmod(x, 11)
if mod == 0:
    print(int(q*2))
elif mod <= 6:
    print(int(q*2+1))
else:
    print(int(q*2+2))

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = n % 11
d = 2*n
if a == 0:
    print(d)
if a <= 6:
    print(d+1)
else:
    print(d+2)


Failing test case input:
2316539

Expected output:
421189


Actual output:
4633079


Fixed submission (verdict: Accepted):
n = int(input())
a = n % 11
d = 2*(n
if a == 0:
    print(d)
elif a <= 6:
    print(d+1)
else:
    print(d+2)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
double, rest = divmod(x, 11)
if rest <= 6:
    add = 1
elif rest > 6:
    add = 2
ans = double * 2 + add
print(ans)

Failing test case input:
19238477126

Expected output:
3497904932


Actual output:
3497904933


Fixed submission (verdict: Accepted):
x = int(input())
double, rest = divmod(x, 11)
if rest == 0:
    add = 0
elif 1<= rest <= 6:
    add = 1
else:
    add = 2
ans = double * 2 + add
print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
q,mod = divmod(x,11)
count=q*2
while True:
    mod -= 6
    count += 1
    if mod <= 0:
        print(count)
        break
    mod -= 5
    count += 1
    if mod <= 0:
        print(count)
        break
    


Failing test case input:
983994

Expected output:
178908


Actual output:
178909


Fixed submission (verdict: Accepted):
x = int(input())
q,mod = divmod(x,11)
count=q*2
while True:
    if mod <= 0:
        print(count)
        break
    mod -= 6
    count += 1
    if mod <= 0:
        print(count)
        break
    mod -= 5
    count += 1

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
count = 0
q, mod = divmod(x, 11)
count += q*2
if(mod < 6):
    count += 1
else:
    count += 2
print(count)


Failing test case input:
2749863688

Expected output:
499975216


Actual output:
499975217


Fixed submission (verdict: Accepted):
x = int(input())
count = 0
q, mod = divmod(x, 11)
count += q*2
if(mod == 0):
    pass
elif(mod <= 6):
    count += 1
else:
    count += 2
print(count)
Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
c = (x/11)*2
x %= 11
if x==0: print(c)
elif x<6: print(c+1)
else: print(c+2)

Failing test case input:
3247730789

Expected output:
590496507


Actual output:
590496509.0909091


Fixed submission (verdict: Accepted):
x = int(input())

q,r = divmod(x,11)
if r==0: print(q*2)
elif r<7: print(q*2+1)
else: print(q*2+2)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

a = n 
b = n % 11
c = 0
if b > 0:
	c = 1
elif b >= 7:
	c = 2
print(a+c)


Failing test case input:
232020

Expected output:
42186


Actual output:
232021


Fixed submission (verdict: Accepted):
n = int(input())

a = (n 

b = n % 11

c = 0
if 7 > b > 0:
	c = 1
elif b >= 7:
	c = 2
print(a+c)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


x = int(input())

q, r = divmod(x, 5 + 6)
ans = 2 * q + r 
print(ans)


Failing test case input:
-141

Expected output:
-25


Actual output:
-24


Fixed submission (verdict: Accepted):


from math import ceil

x = int(input())

q, r = divmod(x, 5 + 6)
ans = 2 * q + ceil(r / 6)
print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())
ans = 0
q, mod = divmod(X,11)

if mod <= 6:
  ans = q * 2 + 1
else:
  ans = q * 2 + 2
print(ans)

Failing test case input:
3630156079

Expected output:
660028378


Actual output:
660028379


Fixed submission (verdict: Accepted):
X = int(input())
ans = 0
q, mod = divmod(X,11)

if mod == 0:
  ans = q * 2
elif mod <= 6:
  ans = q * 2 + 1
else:
  ans = q * 2 + 2
print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
a, b = divmod(x, 11)
if b > 5:
    print(a * 2 + 2)
elif b == 0:
    print(a * 2)
else:
    print(a * 2 + 1)

Failing test case input:
1601465597

Expected output:
291175563


Actual output:
291175564


Fixed submission (verdict: Accepted):
x = int(input())
a, b = divmod(x, 11)
if b > 6:
    print(a * 2 + 2)
elif b == 0:
    print(a * 2)
else:
    print(a * 2 + 1)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
d,m=divmod(int(input()),11);print(d*2+1+(m>5))

Failing test case input:
1601465597

Expected output:
291175563


Actual output:
291175564


Fixed submission (verdict: Accepted):
d,m=divmod(int(input()),11);print(d*2+(m>0)+(m>6))

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

i, j = divmod(x, 11)
if j <= 5:
    ans = i * 2 + 1
else:
    ans = (i + 1) * 2
print(ans)


Failing test case input:
2111835413

Expected output:
383970075


Actual output:
383970076


Fixed submission (verdict: Accepted):
x = int(input())

i, j = divmod(x, 11)
ans = i * 2
if 0 < j <= 6:
    ans += 1
elif 6 < j:
    ans += 2
print(ans)
Problem: p03815
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf')
ans = 0 ;count = 0 ;pro = 1

x=int(input())
a,b=divmod(x,11)
a=math.ceil(x/11)
a*=2
if b<=6:
    
    a-=1
print(a)

Failing test case input:
544563173

Expected output:
99011486


Actual output:
99011485


Fixed submission (verdict: Accepted):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf')
ans = 0 ;count = 0 ;pro = 1

x=int(input())
b=(x-1)%11
a=math.ceil(x/11)
a*=2
if b<=5:
    
    a-=1
print(a)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = divmod(int(input()), 11)
print(a * 2 + (b > 6) + 1)


Failing test case input:
79402108049

Expected output:
14436746918


Actual output:
14436746919


Fixed submission (verdict: Accepted):
a, b = divmod(int(input()), 11)
print(a * 2 + (b > 6) + 1 - (not b))

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())

a, b = divmod(X, 11)

if b <= 6:
    print(a * 2 + 1)
else:
    print(a * 2 + 2)


Failing test case input:
983994

Expected output:
178908


Actual output:
178909


Fixed submission (verdict: Accepted):
X = int(input())

a, b = divmod(X, 11)

if b == 0:
    print(a * 2)
elif b <= 6:
    print(a * 2 + 1)
else:
    print(a * 2 + 2)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections
import itertools
import functools
import math

if __name__ == "__main__":
    x = int(input())
    res = round(x / 5.5)
    print(res)


Failing test case input:
382813

Expected output:
69603


Actual output:
69602


Fixed submission (verdict: Accepted):
import collections
import itertools
import functools
import math

if __name__ == "__main__":
    x = int(input())
    print((x

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

input = sys.stdin.readline


def main():
    N = int(input())

    x, y = divmod(N, 11)
    ans = x * 2
    if y <= 6:
        print(ans + 1)
        return
    elif y <= 11:
        print(ans + 2)
        return


if __name__ == '__main__':
    main()


Failing test case input:
196870267

Expected output:
35794594


Actual output:
35794595


Fixed submission (verdict: Accepted):
import sys

input = sys.stdin.readline


def main():
    N = int(input())

    x, y = divmod(N, 11)
    ans = x * 2
    if 0 < y <= 6:
        ans += 1
    elif 6 < y <= 11:
        ans += 2

    print(ans)


if __name__ == '__main__':
    main()

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
n, rest = divmod(x, 11)
if rest >= 7:
    print(n * 2 + 2)
else:
    print(n * 2 + 1)

Failing test case input:
196870267

Expected output:
35794594


Actual output:
35794595


Fixed submission (verdict: Accepted):
x = int(input())
n, rest = divmod(x, 11)
if rest >= 7:
    print(n * 2 + 2)
elif rest >= 1:
    print(n * 2 + 1)
else:
    print(n * 2)
Problem: p03815
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
q, mod = divmod(x, 11)
print(q * 2 + (1 if mod <= 6 else 2))

Failing test case input:
196870267

Expected output:
35794594


Actual output:
35794595


Fixed submission (verdict: Accepted):
from math import ceil
x = int(input())
q, mod = divmod(x, 11)
print(q * 2 + ceil(mod / 6))

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=int(input())

d=x
r=x%11
if r<=6:
  print(2*d+1)
else:
  print(2*d+2)

Failing test case input:
110012

Expected output:
20003


Actual output:
220025


Fixed submission (verdict: Accepted):
x=int(input())

d=-(-x
r=x%11
if 1<=r<=6:
  print(2*d-1)
else:
  print(2*d)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
ans = x 


if  x % 11 <= 6 and x % 11 != 0:
    ans += 1
else:
    ans += 2

print(ans)

Failing test case input:
544563173

Expected output:
99011486


Actual output:
544563175


Fixed submission (verdict: Accepted):
x = int(input())
ans = (x 


if  x % 11 <= 6 and x % 11 != 0:
    ans += 1
elif x % 11 >= 7:
    ans += 2

print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

dice = [1,2,3,4,5,6]

x = int(input())

times = math.floor(x/11)
amari = x%11

if amari >= 6:
    ans = 2*times + 2
elif amari >= 1:
    ans = 2*times + 1
else:
    ans = 2*times
print(ans)

Failing test case input:
1601465597

Expected output:
291175563


Actual output:
291175564


Fixed submission (verdict: Accepted):
import math
from decimal import *

dice = [1,2,3,4,5,6]

x = int(input())

times = math.floor(Decimal(x)/Decimal(11))
amari = x%11

if amari > 6:
    ans = 2*times + 2
elif amari >= 1:
    ans = 2*times + 1
else:
    ans = 2*times
print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a=int(input())
j=math.floor(a/11)
if a-j*11<=6:
  j=j*2+1
else:
  j=j*2+2
print(j )

Failing test case input:
2749863688

Expected output:
499975216


Actual output:
499975217


Fixed submission (verdict: Accepted):
import math
a=int(input())
j=math.floor(a/11)
if a==j*11:
  j=j*2
elif a - j * 11<=6:
  j=j*2+1
else:
  j=j*2+2
print(j)
Problem: p03815
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	x = int(input())
	print(2*math.floor(x/11)+(1 if x%11<7 else 2))

main()

Failing test case input:
196870267

Expected output:
35794594


Actual output:
35794595


Fixed submission (verdict: Accepted):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	x = int(input())
	rm = x%11
	print(2*math.floor(x/11)+math.ceil(rm/6))

main()

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
double, rest = divmod(x, 11)
if rest <= 6:
    add = 1
else:
    add = 2
ans = double * 2 + add
print(ans)

Failing test case input:
207449

Expected output:
37718


Actual output:
37719


Fixed submission (verdict: Accepted):
x = int(input())
double, rest = divmod(x, 11)
if rest == 0:
    add = 0
elif 1<= rest <= 6:
    add = 1
else:
    add = 2
ans = double * 2 + add
print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n = int(input())

a = n 
b = n % 11
c = 1
if b >= 6:
	c = 2
print(a+c)

Failing test case input:
7222

Expected output:
1313


Actual output:
7224


Fixed submission (verdict: Accepted):
n = int(input())

a = (n 

b = n % 11

c = 0
if 7 > b > 0:
	c = 1
elif b >= 7:
	c = 2
print(a+c)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

if x%11<=6:print(int(x/11)*2+1)
else:print(int(x/11)*2+2)

Failing test case input:
-141

Expected output:
-25


Actual output:
-23


Fixed submission (verdict: Accepted):
x = int(input())

if x%11 == 0:print(x
elif x%11 <=6: print(x
else: print(x

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

i, j = divmod(x, 11)
ans = i * 2
if 0 < j <= 5:
    ans += 1
elif 5 < j:
    ans += 2
print(ans)


Failing test case input:
48714

Expected output:
8857


Actual output:
8858


Fixed submission (verdict: Accepted):
x = int(input())

i, j = divmod(x, 11)
ans = i * 2
if 0 < j <= 6:
    ans += 1
elif 6 < j:
    ans += 2
print(ans)
Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def solve(X):
    q,r = divmod(X, 11)


    if r == 0:
        return (q*2)
    elif r <= 6:
        return (q*2+1)
    else:
        return (q*2+2)

for i in range(22):
    print(i,solve(i))

X = int(input())


Failing test case input:
241754

Expected output:
43956


Actual output:
0 0
1 1
2 1
3 1
4 1
5 1
6 1
7 2
8 2
9 2
10 2
11 2
12 3
13 3
14 3
15 3
16 3
17 3
18 4
19 4
20 4
21 4


Fixed submission (verdict: Accepted):

def solve(X):
    q,r = divmod(X, 11)


    if r == 0:
        return (q*2)
    elif r <= 6:
        return (q*2+1)
    else:
        return (q*2+2)

X = int(input())
print(solve(X))

Problem: p03815
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
print(math.ceil((2 * 149696127901 - 1) / 11))

Failing test case input:
382813

Expected output:
69603


Actual output:
27217477801


Fixed submission (verdict: Accepted):
import math
x = int(input())
print(math.ceil((2 * x - 1) / 11))

Problem: p03815
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

cnt = x 
cnt += (0 if x % 11 == 0 else 1 if x % 11 <= 6 else 2)

print(cnt)

Failing test case input:
3247730789

Expected output:
590496507


Actual output:
3247730790


Fixed submission (verdict: Accepted):
x = int(input())

cnt = 2 * (x 
cnt += (0 if x % 11 == 0 else 1 if x % 11 <= 6 else 2)

print(cnt)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
q, mod = divmod(x, 11)

cnt = q * 2
if mod > 6:
    cnt += 2
else:
    cnt += 1
print(cnt)

Failing test case input:
544563173

Expected output:
99011486


Actual output:
99011487


Fixed submission (verdict: Accepted):
x = int(input())
q, mod = divmod(x, 11)

cnt = q * 2
if mod > 6:
    cnt += 2
elif mod > 0:
    cnt += 1

print(cnt)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
m = 11
if x < 7:
  ans = 1
elif x < 11:
  ans = 2
elif x%m == 0:
  ans = x*2
elif 0 < x%m <= 6:
  ans = x*2
elif 7 <= x%m:
  ans = x*2
print(ans)

Failing test case input:
3247730789

Expected output:
590496507


Actual output:
6495461578


Fixed submission (verdict: Accepted):
x = int(input())
m = 11
if x < 7:
  ans = 1
elif x <= 11:
  ans = 2
elif x%m == 0:
  ans = x*2
elif 0 < x%m <= 6:
  ans = (x
elif 7 <= x%m:
  ans = (x
print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
s = x
x = x%11
if x>5:
  s += 1
if x>0:
  s += 1
print(s)

Failing test case input:
14885609983

Expected output:
2706474543


Actual output:
14885609984


Fixed submission (verdict: Accepted):
x = int(input())
s = (x
x = x%11
if x>6:
  s += 1
if x>0:
  s += 1
print(s)
Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

cnt = 0
if x % 11 == 0:
    cnt = x 
elif 1 <= x % 11 <= 6:
    cnt = x 
elif 7 <= x % 11 <= 10:
    cnt = x 

print(cnt)

Failing test case input:
1601465597

Expected output:
291175563


Actual output:
1601465597


Fixed submission (verdict: Accepted):
x = int(input())

cnt = 0
if x % 11 == 0:
    cnt = (x 
elif 1 <= x % 11 <= 6:
    cnt = (x 
elif 7 <= x % 11 <= 10:
    cnt = (x 

print(cnt)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

div, mod = divmod(x, 11)

div = div*2
if mod <= 5:
    div = div + 1
else:
    div = div + 2

print(div)

Failing test case input:
7222

Expected output:
1313


Actual output:
1314


Fixed submission (verdict: Accepted):
x = int(input())

div, mod = divmod(x, 11)

div = div*2
if mod == 0:
    pass
elif mod <= 6:
    div = div + 1
else:
    div = div + 2

print(div)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

temp = int(input())/5.5
syousuu = temp - math.floor(temp)
if syousuu < 0.1:
    print(-1 + math.ceil(temp))
else:
    print(math.ceil(temp))

Failing test case input:
544563173

Expected output:
99011486


Actual output:
99011485


Fixed submission (verdict: Accepted):
import math

temp = int(input())/5.5
syousuu = temp - math.floor(temp)
if syousuu < 0.1 and syousuu > 0.0001:
    print(-1 + math.ceil(temp))
else:
    print(math.ceil(temp))

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
q,mod = divmod(x,11)
count=q*2
sum
while True:
    mod -= 6
    count += 1
    if mod < 0:
        print(count)
        break
    mod -= 5
    count += 1
    if mod < 0:
        print(count)
        break
        
    


Failing test case input:
2111835413

Expected output:
383970075


Actual output:
383970076


Fixed submission (verdict: Accepted):
x = int(input())
q,mod = divmod(x,11)
count=q*2
while True:
    if mod <= 0:
        print(count)
        break
    mod -= 6
    count += 1
    if mod <= 0:
        print(count)
        break
    mod -= 5
    count += 1

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
result, r = divmod(n, 11)
print(result*2 + 1 + (r>5))

Failing test case input:
1601465597

Expected output:
291175563


Actual output:
291175564


Fixed submission (verdict: Accepted):
n = int(input())
result, r = divmod(n-1, 11)
r += 1
print(result*2 + 1 + (r>6))

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())

if n <= 6:
  print(1)
  exit(0)

if n <= 11:
  print(2)
  exit(0)
  
a = math.floor((n / 11)*2)
amari = n % 11
if amari <= 6:
  print(a + 1)
  exit(0)

if amari > 6:
  print(a + 2)
  exit(0)

print(a)


Failing test case input:
-267

Expected output:
-48


Actual output:
1


Fixed submission (verdict: Accepted):
import math
n = int(input())
  
a = math.floor((n / 11))*2
amari = n % 11
if amari == 0:
  print(a)
  exit(0)
  
if amari <= 6:
  print(a + 1)
  exit(0)

if amari > 6:
  print(a + 2)
  exit(0)

print(a)
Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=int(input())
num=x
x%=11
if(x==0):print(num)
elif(x<=6):print(num+1)
else:print(num+2)

Failing test case input:
-255

Expected output:
-46


Actual output:
-253


Fixed submission (verdict: Accepted):
x=int(input())
num=(x
x%=11
if(x==0):print(num)
elif(x<=6):print(num+1)
else:print(num+2)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
from decimal import *

dice = [1,2,3,4,5,6]

x = int(input())

times = math.floor(Decimal(x)/Decimal(11))
amari = x%11

if amari >= 6:
    ans = 2*times + 2
elif amari >= 1:
    ans = 2*times + 1
else:
    ans = 2*times
print(ans)

Failing test case input:
48714

Expected output:
8857


Actual output:
8858


Fixed submission (verdict: Accepted):
import math
from decimal import *

dice = [1,2,3,4,5,6]

x = int(input())

times = math.floor(Decimal(x)/Decimal(11))
amari = x%11

if amari > 6:
    ans = 2*times + 2
elif amari >= 1:
    ans = 2*times + 1
else:
    ans = 2*times
print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
double, rest = divmod(x, 11)
add = 0
if rest <= 6:
    add = 1
elif rest > 6:
    add = 2
ans = double * 2 + add
print(ans)

Failing test case input:
2749863688

Expected output:
499975216


Actual output:
499975217


Fixed submission (verdict: Accepted):
x = int(input())
double, rest = divmod(x, 11)
if rest == 0:
    add = 0
elif 1<= rest <= 6:
    add = 1
else:
    add = 2
ans = double * 2 + add
print(ans)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
d,m = divmod(x,11)
if m <= 6:
    print(d*2+1)
else:
    print(d*2+2)

Failing test case input:
3630156079

Expected output:
660028378


Actual output:
660028379


Fixed submission (verdict: Accepted):
x = int(input())
d,m = divmod(x,11)
if m == 0:
    print(d*2)
elif m <= 6:
    print(d*2+1)
else:
    print(d*2+2)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
count = 0
q, mod = divmod(x, 11)
count += q*2
if(mod <= 6):
    count += 1
else:
    count += 2
print(count)


Failing test case input:
196870267

Expected output:
35794594


Actual output:
35794595


Fixed submission (verdict: Accepted):
x = int(input())
count = 0
q, mod = divmod(x, 11)
count += q*2
if(mod == 0):
    pass
elif(mod <= 6):
    count += 1
else:
    count += 2
print(count)

Problem: p03815
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def abc053c(x: int):
    y = int(x / 11)
    m = x - (y * 11)
    return y * 2 + 1 + int(m / 6)


if __name__ == '__main__':
    print(abc053c(int(input())))


Failing test case input:
19238477126

Expected output:
3497904932


Actual output:
3497904933


Fixed submission (verdict: Accepted):
import math


def abc053c(x: int):
    y = int(x / 11)
    m = x - (y * 11)
    return y * 2 + math.ceil(m / 6)


if __name__ == '__main__':
    print(abc053c(int(input())))