ZhenlongDai/ACPR huggingface dataset:
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
if c-a-b <= 0:
    print(0)
elif 4*a*b < (c-a-b)**2:
    print('Yes')
else:
    print('No')


Failing test case input:
001 0 -4

Expected output:
No


Actual output:
0


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
if c-a-b <= 0:
    print('No')
elif 4*a*b < (c-a-b)**2:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
 
a, b, c = input().split()
a, b, c = int(a), int(b), int(c)

if 4*a*b < (c - a - b)**2:
  print("Yes")
else:
  print("No")

Failing test case input:
16 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math
 
a, b, c = input().split()
a, b, c = int(a), int(b), int(c)

d = c - a - b

if (4*a*b < d*d) and (0 < d):
  print("Yes")
else:
  print("No")

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

if 4*a*b < (c-a-b)**2:
    print("Yes")
else:
    print("No")

Failing test case input:
111 -1 -3

Expected output:
No


Actual output:
Yes


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

if 4*a*b < (c-a-b)**2 and c-a-b>0:
    print("Yes")
else:
    print("No")

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

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

cab=c-a-b
cab_sq=cab*cab
ab4=4*a*b

if (ab4 < cab_sq):
    print("Yes")
else:
    print("No")

Failing test case input:
110 -1 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math;

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

cab=(c-a-b)
cab_sq=cab*cab
ab4=4*a*b

if (cab > 0 and ab4 < cab_sq):
    print("Yes")
else:
    print("No")

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

if a*b*4 < (c-a-b)**2:
    print('Yes')
else:
    print('No')

Failing test case input:
30 0 -2

Expected output:
No


Actual output:
Yes


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

n = c-a-b
if n < 0:
    print('No')
elif a*b*4 < n**2:
    print('Yes')
else:
    print('No')

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

if int((c-a-b) ** 2) - int(4*a*b) > 0:
    print("Yes")
else:
    print("No")

Failing test case input:
4 2 -1

Expected output:
No


Actual output:
Yes


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

if c-a-b > 0:
    if int((c-a-b) ** 2) - int(4*a*b) > 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    a, b, c = map(int, input().split())
    test = (c - (a + b)) / 2
    if a * b < test * test:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()


Failing test case input:
16 -1 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def main():
    a, b, c = map(int, input().split())
    T = (c - a - b)
    if 4 * a * b < T ** 2 and T > 0:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if (c-a-b)**2>4*a*b:
    print("Yes")
else:
    print("No")

Failing test case input:
101 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if c<a+b:
    print("No")
elif (c-a-b)**2>4*a*b:
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint,random
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a,b,c = inpl()
x = 4 * a * b - pow(a,2) - pow(b,2) - pow(c,2) + (a*c-a*b+b*c)*2
if x < 0:
    print('Yes')
else:
    print('No')


Failing test case input:
2 5 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint,random
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a,b,c = inpl()
x = 4 * a * b
y = pow(c-a-b,2)
if x<y and c-a-b>0:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import bisect, collections

def solution():
    a, b, c = [int(x) for x in input().strip().split(" ")]
    if (c-a-b)**2 > 4*a*b:
        print("Yes")
    else:
        print("No")
    



def main():    
    
    for _ in range(1):
        solution()
    

main()

Failing test case input:
2 5 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import bisect, collections

def solution():
    a, b, c = [int(x) for x in input().strip().split(" ")]
    if (c-a-b) >= 0 and (c-a-b)**2 > 4*a*b:
        print("Yes")
    else:
        print("No")
    



def main():    
    
    for _ in range(1):
        solution()
    

main()

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

if 4*a*b < (c-a-b)**2:
    print('Yes')
else:
    print('No')

Failing test case input:
2 5 -3

Expected output:
No


Actual output:
Yes


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

if c-a-b >= 0 and 4*a*b < (c-a-b)**2:
    print('Yes')
else:
    print('No')
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import random as rng
import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp
sys.setrecursionlimit(10**9)


def dump_impl(*objects):
    print(*objects, file=sys.stderr)


def dump_dummy(*objects):
    pass


dump = dump_impl if "DEBUG" in sys.argv else dump_dummy

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

print("Yes" if (4*a*b < (c-a-b)*(c-a-b)) else "No")


Failing test case input:
59 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import random as rng
import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp
sys.setrecursionlimit(10**9)


def dump_impl(*objects):
    print(*objects, file=sys.stderr)


def dump_dummy(*objects):
    pass


dump = dump_impl if "DEBUG" in sys.argv else dump_dummy

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

cab = c-a-b
ab4 = 4*a*b
print("Yes" if (cab >= 0 and ab4 < cab*cab) else "No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if (4 * a * b < (c - a - b) * (c - a - b)):
    print("Yes")
else:
    print("No")


Failing test case input:
100 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if (4 * a * b < (c - a - b) * (c - a - b) and c - a - b >= 0):
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
print(['No','Yes'][4*a*b<(c-a-b)**2])

Failing test case input:
000 0 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
print(['No','Yes'][4*a*b<(c-a-b)**2 and a+b<c])

Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math

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





if a + b - c > 0:
    if (a + b - c)**2 > 4 * a * b:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Failing test case input:
-10 1 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import math

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





if (c - a - b)**2 > 4 * a * b and c - a - b > 0:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from decimal import Decimal
A,B,C=map(int,input().split())
if Decimal(4*A*B)<Decimal((C-A-B)**2):
  print("Yes")
else:
  print("No")

Failing test case input:
2 14 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from decimal import Decimal
A,B,C=map(int,input().split())
if (C-A-B)<0:
  print("No")
else:  
  if Decimal(4*A*B)<Decimal((C-A-B)**2):
    print("Yes")
  else:
    print("No")
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if (c - a - b) ** 2 - 4 * a * b > 0:
    print('Yes')
else:
    print('No')

Failing test case input:
16 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if (c - a - b) ** 2 - 4 * a * b > 0 and c - a - b > 0:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l=[int(e) for e in input().split(' ')]
a=l.pop(0)
b=l.pop(0)
c=l.pop(0)

lt=4*a*b
rt=c**2 - 2*(a+b)*c + (a+b)**2

if lt < rt:
    print('Yes')
else:
    print('No')


Failing test case input:
011 0 -4

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
l=[int(e) for e in input().split(' ')]
a=l.pop(0)
b=l.pop(0)
c=l.pop(0)

if c < (a+b):
    print('No')
    exit()


lt=4*a*b + 2*(a+b)*c
rt=c**2 + (a+b)**2

if lt < rt:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a,b,c = map(int,input().split())
if (a+b-c) ** 2 - 4 * a * b > 0:
    print("Yes")
else:
    print("No")

Failing test case input:
3 14 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math
a,b,c = map(int,input().split())
if (a+b-c) ** 2 - 4 * a * b > 0 and a+b < c:
    print("Yes")
else:
    print("No")

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


def main():
    a, b, c = map(int, input().split())

    if 4 * a * b < (c - a - b) ** 2:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()


Failing test case input:
3 14 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):


def main():
    a, b, c = map(int, input().split())

    if (c - a - b) ** 2 - 4 * a * b > 0 and c - a - b > 0:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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

if (c+a+b)**2 -4*(a*b+b*c+c*a) >0:
  print('Yes')
else:
  print('No')

Failing test case input:
16 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c = list(map(int,input().split()))
if (c-a-b)**2 -4*a*b >0 and c-a-b>0:
  print('Yes')
else:
  print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import sqrt

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

if 4*a*b < (c-a-b)**2:
    print('Yes')
else:
    print('No')

Failing test case input:
010 0 -6

Expected output:
No


Actual output:
Yes


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

if c-(a+b) >= 0:
    if 4*a*b < (c-(a+b))**2:
        print('Yes')
    else:
        print('No')
else:
        print('No')
Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())

d = c - a - b
if d > 0 and d > 4 * a * b > 0:
	print('Yes')
else:
	print('No')

Failing test case input:
-3 0 2

Expected output:
Yes


Actual output:
No


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

d = c - a - b
if d > 0 and d ** 2 > 4 * a * b:
	print('Yes')
else:
	print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    a, b, c = map(int, input().split())

    if 4 * a * b < (c - a - b) * (c - a - b):
        print("Yes")
    else:
        print("No")


main()


Failing test case input:
2 14 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def main():
    a, b, c = map(int, input().split())

    if c - a - b < 0:
        print("No")
    elif 4 * a * b < (c - a - b) * (c - a - b):
        print("Yes")
    else:
        print("No")


main()

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
ans = 'Yes' if 4*a*b < (c - a - b)**2 and c - a - b < 0 else 'No'
print(ans)

Failing test case input:
9 -1 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
ans = 'Yes' if 4*a*b < (c - a - b)**2 and c - a - b > 0 else 'No'
print(ans)

Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
a,b,c = map(int, input().split())
if 4*a*b<(c-a-b)**2:
    print('Yes')
else:
    print('No')

Failing test case input:
101 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math
a,b,c = map(int, input().split())
if 4*a*b<(c-a-b)**2 and c-a-b>0:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
[a, b, c] = map(int, input().split())
Left = 4*a*b
Right = (c-a-b)*(c-a-b)
if(Left < Right):
    print('Yes')
else:
    print('No')

Failing test case input:
2 5 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
[a, b, c] = map(int, input().split())
Left = 4*a*b
Right = (c-a-b)
if(Right>0):
    if(Left < Right*Right):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = [int(i) for i in input().split()]
print("Yes" if(a * a + b * b + c * c - 2 * a * b - 2 * b * c - 2 * c * a > 0) else "No")

Failing test case input:
011 0 -6

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c = [int(i) for i in input().split()]
print("Yes" if(a * a + b * b + c * c - 2 * a * b - 2 * b * c - 2 * c * a > 0 and c - a - b > 0) else "No")
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):






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


def main():
    x = 4 * a * b
    y = (c - a - b) ** 2
    if y >= 0 and x < y:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()


Failing test case input:
59 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):






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


def main():
    x = 4 * a * b
    y = c - a - b
    if y >= 0 and x < y ** 2:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
z = c-a-b
if a*b < (z**2)/4:
	print("Yes")
else:
	print("No")	


Failing test case input:
2 14 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
z = c-a-b
res = z**2 -4*a*b
if z > 0 and res >0:
	print("Yes")
else:
	print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a, b, c = map(int, input().split())
left = a * b
right = (c - (a + b)) / 2
right = right ** 2
if (left < right):
  print('Yes')
else:
  print('No')


Failing test case input:
2 5 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
left = 4 * a * b
right = c - (a + b)
if (right < 0):
  print('No')
  exit()
right = right ** 2
if (left < right):
  print('Yes')
else:
  print('No')

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

d = a + b - c

ans = 4 * a * b - d

print('Yes' if ans > 0 else 'No')


Failing test case input:
4 2 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c = [int(i) for i in input().split()]
d = a + b - c

ans = d**2  - 4 * a * b

if d < 0 and ans > 0:
    print('Yes')
else:
    print('No')

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

a,b,c = map(int,input().split())
A = a*a + 2*a*b + b*b
C = c*c
if A < C:
    print("Yes")
else:
    print("No")

Failing test case input:
-10 0 0

Expected output:
Yes


Actual output:
No


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

d = c-a-b
if d>0 and 4*a*b<d*d:
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())


tmp = c - a - b
if tmp ** 2 > 4 * a * b:
    print("Yes")
else:
    print("No")

Failing test case input:
16 0 -2

Expected output:
No


Actual output:
Yes


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


tmp = c - a - b
if tmp < 0 :
    print("No")
    exit()
if tmp ** 2 > 4 * a * b:
    print("Yes")
else:
    print("No")
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a,b,c = map(int,input().split())
d = c-a-b
if 4*a*b < d ** 2:
    print("Yes")
else:
    print("No")

Failing test case input:
16 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math
a,b,c = map(int,input().split())
d = c-a-b
if d < 0:
    print("No")
elif 4*a*b < d ** 2:
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())

if (c-a-b)**2 - 4*a*b >= 0:
    print("Yes")
else:
    print("No")


Failing test case input:
000 0 -3

Expected output:
No


Actual output:
Yes


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

if (c-a-b)**2 - 4*a*b > 0 and c-a-b > 0:
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
d = c - a - b
if d <= 0:
    print('No')
if 4*a*b < d**2:
    print('Yes')
else:
    print('No')


Failing test case input:
000 0 -6

Expected output:
No


Actual output:
No
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
d = c - a - b
if d < 0:
    print('No')
elif 4*a*b < d**2:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
args=list(map(int,input().strip().split()))

msg = ['Yes', 'No']

a = args[0] + args[1] - args[2]
b = args[0] * args[1] * 4

if((a>0)and(pow(a,2)>b)):
    print(msg[0])
else:
    print(msg[1])


Failing test case input:
011 0 -6

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
args=list(map(int,input().strip().split()))

msg = ['Yes', 'No']

a = args[2] - args[1] - args[0]
b = args[0] * args[1] * 4

if((a>0)and(pow(a,2)>b)):
    print(msg[0])
else:
    print(msg[1])

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
print("Yes" if 4*a*b<(c-a-b)**2 else "No")


Failing test case input:
100 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math as m
a,b,c = map(int,input().split())
print("Yes" if 4*(a*b) < (c - a - b)**2 and c-a-b > 0 else "No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
if c-a-b<0:
    if (c-a-b)**2 > 4*a*b:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Failing test case input:
3 3 14

Expected output:
Yes


Actual output:
No


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

if (c-a-b)**2 > 4*a*b:
    if c-a-b<0:
        print('No')
    else:
        print('Yes')
else:
    print('No')
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

square_list = [i**2 for i in range(1, 10**5)]

def integer_squareroot(x):
    imin = 0
    imax = x
    while imin <= imax:
        imid = (imin + imax) 
        imid_squared = imid ** 2
        if imid_squared <= x:
            imin = imid + 1
        else:
            imax = imid - 1

    return imin - 1


a, b, c = map(int, input().split())
if 4 * a * b < (1-c-a-b) ** 2:
    print("Yes")
else:
    print("No")














Failing test case input:
011 0 -6

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math

square_list = [i**2 for i in range(1, 10**5)]

def integer_squareroot(x):
    imin = 0
    imax = x
    while imin <= imax:
        imid = (imin + imax) 
        imid_squared = imid ** 2
        if imid_squared <= x:
            imin = imid + 1
        else:
            imax = imid - 1

    return imin - 1


a, b, c = map(int, input().split())
if 4 * a * b < (c-a-b) ** 2 and c - a - b > 0:
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())

if 4*a*b < (c-a-b)**2 :
    print('Yes')
else :
    print('No')

Failing test case input:
9 0 0

Expected output:
No


Actual output:
Yes


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

if c-a-b < 0:
    print('No')
elif 4*a*b < (c-a-b)**2 :
    print('Yes')
else :
    print('No')

Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def solve():
    a,b,c = map(int, input().split())
    if 4 * a * b < (c-a-b)**2:
        print('Yes')
    else:
        print('No')
    
if __name__ == '__main__':
    solve()

Failing test case input:
001 0 -4

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math
def solve():
    a,b,c = map(int, input().split())
    if 4 * a * b < (c-a-b)**2 and c-a-b>0:
        print('Yes')
    else:
        print('No')
    
if __name__ == '__main__':
    solve()

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

import math


def main():

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

    if a * b < ((c - a - b) / 2) ** 2:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()


Failing test case input:
110 0 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

import math


def main():

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

    if (c - a - b) > 0 and 4 * a * b < (c - a - b) * (c - a - b) :
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if (c-a-b)**2 > 4*a*b:
  print('Yes')
else:
  print('No')

Failing test case input:
9 -1 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if c-a-b < 0:
  print('No')
elif (c-a-b)**2 > 4*a*b:
  print('Yes')
else:
  print('No')
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
import math

if a * a + b * b + c * c - 2 * (a * b + b * c + c * a) > 0:
  print("Yes")
else:
  print("No")

Failing test case input:
7 -1 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
import math

if c - a - b < 0:
  print("No")
  exit()

if a * a + b * b + c * c - 2 * (a * b + b * c + c * a) > 0:
  print("Yes")
else:
  print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())

tmp = (c-(a+b))**2
tmp1 = 4*a*b

if(tmp > tmp1):
    print("Yes")
else:
    print("No")

Failing test case input:
110 0 -3

Expected output:
No


Actual output:
Yes


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

if((c-(a+b))**2 > 4*a*b and c-(a+b) > 0):
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a, b, c = map(int, input().split())
print('Yes' if (4 * a * b) < (c - a - b) * (c - a - b) else 'No')

Failing test case input:
100 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math
a, b, c = map(int, input().split())
if c - a - b < 0:
    print('No')
else:
    print('Yes' if (4 * a * b) < (c - a - b) * (c - a - b) else 'No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())

print('Yes' if (c - a - b) * (c - a - b) > 4 * a * b else 'No')

Failing test case input:
16 -1 0

Expected output:
No


Actual output:
Yes


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

print('Yes' if (c - a - b) * (c - a - b) > 4 * a * b and c - a - b > 0 else 'No')

Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,c = map(int,input().split())
x = c-a-b
if x**2 > 4* a*b:
    print('Yes')
else:
    print('No')

Failing test case input:
101 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
x = c-a-b
if x <= 0:
    print('No')
else:
    if x*x > 4* a*b:
        print('Yes')
    else:
        print('No')

Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from math import sqrt
a, b, c = map(int, input().split())
d = (c - a - b)**2 / 4
if  a * b < (c - a - b)**2 / 4:
    print("Yes")
else:
    print("No")

Failing test case input:
100 0 -6

Expected output:
No


Actual output:
Yes


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

if (c - a - b) > 0 and 4 * a * b < (c - a - b)**2:
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from decimal import Decimal
from math import sqrt
a,b,c=map(int,input().split())
if 4*a*b < (c-a-b)**2:
    print('Yes')
else:
    print('No')

Failing test case input:
2 5 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if 4*a*b < (c-a-b)**2 and c-a-b>0:
    print('Yes')
else:
    print('No')
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a,b,c=map(int,input().split())
l=4*a*b
t=c-a-b
r=t*t
if l<r:
    print("Yes")
else:
   print("No")



Failing test case input:
30 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math
a,b,c=map(int,input().split())
l=4*a*b
t=c-a-b
r=t*t

if t>0 and l<r:
    print("Yes")
else:
   print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int, input().split())  

if c/2 > a+b:
  print('Yes')
else:
  print('No')

Failing test case input:
2 3 10

Expected output:
Yes

Actual output:
No


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

d = c-a-b
if d>0 and d*d > 4*a*b:
  print('Yes')
else:
  print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
m=a*b+b*c+c*a
if a**2+b**2+c**2-2*m>0:
    print('Yes')
else:
    print('No')


Failing test case input:
000 0 -6

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
if (c-a-b)**2-4*a*b<=0 or c-a-b<0:
    print('No')
else:
    print('Yes')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
X = 4*a*b
Y = c-a-b
if X < Y and Y > 0:
    print("Yes")
else:
    print("No")

Failing test case input:
-16 -1 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
X = 4*a*b
Y = c-a-b
if X < Y*Y and Y > 0:
    print("Yes")
else:
    print("No")

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

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nf = lambda: map(float, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
mod = 10**9 + 7 
sys.setrecursionlimit(1000010)


a,b,c = nf()


if (c - a -b ) **2 - 4 * (a*b) > 0:
    print('Yes')
else:
    print('No')

Failing test case input:
16 -1 0

Expected output:
No


Actual output:
Yes


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

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nf = lambda: map(float, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
mod = 10**9 + 7 
sys.setrecursionlimit(1000010)


a,b,c = nm()

if c -a -b < 0: 
    print('No')
    exit(0)


if (c - a -b ) **2 - 4 * (a*b) > 0:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x,y,z = map(int, input().split())
 
if (x + y - z) * (x + y - z) > (4 * x * y):
  if x + y - z < 0:
    print('No')
  else:
    print('Yes')
else:
  print('No')

Failing test case input:
-3 0 7

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
x,y,z = map(int, input().split())
 
if (x + y - z) * (x + y - z) > (4 * x * y):
  if z -x - y < 0:
    print('No')
  else:
    print('Yes')
else:
  print('No')
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())

if 4 * a * b < (c - a - b) ** 2:
    print('Yes')
else:
    print('No')


Failing test case input:
010 0 -6

Expected output:
No


Actual output:
Yes


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

if (c - a - b) > 0 and 4 * a * b < (c - a - b) ** 2:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if 4 * a * b < (c - a - b) ** 2:
    print("Yes")
else:
    print("No")

Failing test case input:
2 14 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if 4 * a * b < (c - a - b) ** 2 and (c - a - b) > 0:
    print("Yes")
else:
    print("No")

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

A,B,C=map(int,input().split())
if 4*A*B<(C-A-B)**2:
    print('Yes')
else:
    print('No')




Failing test case input:
101 0 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

A,B,C=map(int,input().split())
if 4*A*B<(C-A-B)**2:
    if C-A-B>=0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

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

if 4*a*b < (c-a-b)**2:
    print('Yes')
else :
    print('No')

Failing test case input:
100 0 -3

Expected output:
No


Actual output:
Yes


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

if a + b >= c:
    print('No')
else:
    if 4*a*b < (c-a-b)**2:
        print('Yes')
    else :
        print('No')

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a,b,c = map(int,input().split())
if a*b*4 < (c-a-b)**2:
    print("Yes")
else:
    print("No")

Failing test case input:
2 5 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math
a,b,c = map(int,input().split())
if a*b*4 < (c-a-b)**2 and c-a-b > 0:
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from math import sqrt
a, b, c = map(int, input().split())
if (c - a - b) ** 2 > 4 * a * b or sqrt(a) + sqrt(b) < sqrt(c):
    print("Yes")
else:
    print("No")

Failing test case input:
16 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if (c - a - b) ** 2 > 4 * a * b and c - a - b > 0:
    print("Yes")
else:
    print("No")

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

a,b,c = (int(x) for x in input().split())

if a**2 + b**2 + c**2 -2*(a*b + b*c + c*a)>0:
    print("Yes")
else:
    print("No")


Failing test case input:
3 14 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import math

a,b,c = (int(x) for x in input().split())

if a*(a-2*b) + b*(b-2*c) + c*(c-2*a)>0 and c - a - b > 0:
    print("Yes")
else:
    print("No")
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
[a,b,c] = [int(x) for x in input().split()]

if 2*a*c + 2*b*c + 4*(a*b) < a**2 + b**2 + c**2 + 2*a*b:
    print("Yes")
else:
    print("No")


Failing test case input:
16 -1 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
[a,b,c] = [int(x) for x in input().split()]

if c-a-b > 0 and 4*a*b < (c-a-b)**2:
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint,random
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a,b,c = inpl()
x = 4 * a * b
y = a**2 + b**2 + c**2 - (a*c-a*b+b*c)*2
if x-y < 0:
    print('Yes')
else:
    print('No')


Failing test case input:
3 14 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint,random
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a,b,c = inpl()
x = 4 * a * b
y = pow(c-a-b,2)
if x<y and c-a-b>0:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

a, b, c = map(float, input().split())

ans = "No"

if a*b*4 < (c-a-b)**2:
    ans = "Yes"
print(ans)


Failing test case input:
16 -1 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
ans = "No"

x = a*b*4
y = c-a-b

if y < 0:
    ans = "No"
elif x < (y)**2:
    ans = "Yes"

print(ans)

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
a, b, c = map(int, input().split())
if 4*a*b < (c-(a+b))*2:
    print('Yes')
else:
    print('No')

Failing test case input:
-1 -8 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import math
a, b, c = map(int, input().split())
if c-(a+b) > 0 and 4*a*b < (c-(a+b))**2:
    print('Yes')
else:
    print('No')

Problem: p02743
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if 4*(a+b) < (c-a-b)**2:
    print("Yes")
else:
    print("No")


Failing test case input:
16 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if 4*(a*b) < (c-a-b)**2 and c-a-b>0:
    print("Yes")
else:
    print("No")

Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())

if a*b<((c-a-b)/2)*((c-a-b)/2):
    
    print('Yes')
else:
    print('No')


Failing test case input:
111 -1 -3

Expected output:
No


Actual output:
Yes


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

if c-a-b>0 and 4*a*b<(c-b-a)*(c-a-b):
    print('Yes')
else:
    print('No')
Problem: p02743
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
d = c-a-b


if a*b < d*d/4:
    print("Yes")
else:
    print("No")



Failing test case input:
4 2 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
d = c-a-b
if d<=0:
    print("No")
elif 4*a*b < d*d:
    print("Yes")
else:
    print("No")

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

def main():
    a,b,c = map(int,input().split())
    
    if 4*a*b < (c-a-b)**2:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()


Failing test case input:
16 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.buffer.readline

def main():
    a,b,c = map(int,input().split())
    
    if c-a-b < 0:
        print("No")
    elif 4*a*b < (c-a-b)**2:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

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

if ((c-a-b) ** 2)*1000 - 4 * a * b *1000> 0 :
  print('Yes')
else:
  print('No')


Failing test case input:
110 0 -3

Expected output:
No


Actual output:
Yes


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

if c-a-b >= 0:
  
  if ((c-a-b) ** 2) - 4 * a * b > 1e-10:
    print('Yes')
  else:
    print('No')
else:
  print('No')
Problem: p03427
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
for i in range(len(n)):
    if n[-i-1] != "9":
        if i == -len(n): print(int(n[0])+9*(len(n)-1))
        else: print(int(n[i])-1+9*(len(n)-1))
        break
else: print(9*len(n))

Failing test case input:
359

Expected output:
20


Actual output:
22


Fixed submission (verdict: Accepted):
n = input(); a = 0; b = 0; c = int(n[0])
for i in range(len(n)):
    if n[i] != "9":
        if a == 0: a += 1; b = i
        else: a += 1
if a == 0: print(9*len(n))
elif a == 1 and b == 0: print(c+9*(len(n)-1))
else: print(c-1+9*(len(n)-1))

Problem: p03427
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()

a = len(N) - 1
b = int(N[0])

ans = (b-1) + 9 * a

if int(str(b) + "9"*a) < int(N):
    print(ans)
else:
    ans = b + 9 * a
    print(ans)



Failing test case input:
99367823906

Expected output:
98


Actual output:
99


Fixed submission (verdict: Accepted):
N = input()
ans = 0

if N[1:] == "9" * (len(N) - 1):
    ans = int(N[0]) + (9 * (len(N) - 1))
else:
    ans = int(N[0]) + 9 * (len(N) - 1) - 1

print(ans)

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

if len(n) == 1:
    print(n[0])
    exit()

if n.count(9) == len(n)-1:
    print(n[0] + (len(n)-1)*9)
else:
    print(n[0]-1 + (len(n)-1)*9)

Failing test case input:
9995

Expected output:
35

Actual output:
36


Fixed submission (verdict: Accepted):
n = list(map(int,input()))

if len(n) == 1:
    print(n[0])
    exit()

if n[1:].count(9) == len(n) -1:
    print(n[0] + (len(n)-1)*9)
else:
    print(n[0]-1 + (len(n)-1)*9)

Problem: p03427
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=list(map(int,input()))
L=len(N)

ans1=9*(L-1)

for i in range(L-1):
    if N[i]>N[i+1]:
        N[i]=N[i]-1
        for j in range(i+1,L):
            N[j]=9
        break

ans2=sum(N)

print(max(ans1,ans2))

Failing test case input:
7740960558495

Expected output:
114


Actual output:
112


Fixed submission (verdict: Accepted):
N=list(map(int,input()))
L=len(N)

ans1=9*(L-1)+N[0]-1

for i in range(L-1):
    if N[i]>N[i+1]:
        N[i]=N[i]-1
        for j in range(i+1,L):
            N[j]=9
        break

ans2=sum(N)

print(max(ans1,ans2))

Problem: p03427
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=list(input())
cnt=0
size=len(N)-1
if size==0:
    print(N[0])
    exit()
N.reverse()

for i in range(size):
    if N[i]!="9":
        N[i]="9"
        N[i+1]=str(int(N[i+1])-1)
print(cnt)

for i in range(size+1):
    cnt+=int(N[i])
print(cnt)


Failing test case input:
6928151062547

Expected output:
113


Actual output:
0
113


Fixed submission (verdict: Accepted):
N=list(input())
cnt=0
size=len(N)-1
if size==0:
    print(N[0])
    exit()
N.reverse()

for i in range(size):
    if N[i]!="9":
        N[i]="9"
        N[i+1]=str(int(N[i+1])-1)
for i in range(size+1):
    cnt+=int(N[i])
print(cnt)
Problem: p03427
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
X = int(input())
Y = list(map(int, str(X)))
if X >= 10:
  ans = max(X, Y[0]-1+9*(len(Y)-1))
else:
  ans = X
print(ans)


Failing test case input:
19130

Expected output:
36


Actual output:
19130


Fixed submission (verdict: Accepted):
X = int(input())
Y = list(map(int, str(X)))
if X >= 10:
  ans = max(sum(Y), Y[0]-1+9*(len(Y)-1))
else:
  ans = X
print(ans)

Problem: p03427
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()

if set(list(n)) == {'9'}:
    print(len(list(n))*9)
    exit()

tmp = ''
for i in range(1,len(n)):
    if n[i] == '9':
        tmp += '9'
    else:
        n[i]!= '9'
        tmp += str(int(n[i-1])-1) + '9'*(len(n)-i)
        break

ans=0
for i in range(len(tmp)):
    ans += int(tmp[i]) 

print(ans)

Failing test case input:
29243813

Expected output:
64


Actual output:
71


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

if len(list(n)) == 1:
    print(int(n))
    exit()

if set(list(n)) == {'9'}:
    print(len(list(n))*9)
    exit()

tmp = ''
for i in range(1,len(n)):
    if n[i] == '9':
        tmp += n[i-1]
    else:
        tmp += str(int(n[i-1])-1) + '9'*(len(n)-i)
        break
else:
    tmp += '9'

ans=0
for i in range(len(tmp)):
    ans += int(tmp[i]) 

print(ans)

Problem: p03427
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(10**6)
if sys.platform in (['ios','darwin','win32']):
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

def main():
	N = INT()
	S = [int(s) for s in str(N)]
	

	A = []
	smaller = False
	for i in range(len(S)-1):
		if smaller:
			A.append(9)
		else:
			if S[i] == 9 and S[i+1] == 9:
				A.append(9)
			elif S[i+1] == 9:
				A.append(S[i])
			else:
				smaller = True
				A.append(S[i]-1)

	if smaller: A.append(9)
	else: A.append(S[-1])

	print(A)
	print(sum(A))

if __name__ == '__main__':
	main()

Failing test case input:
7740960558495

Expected output:
114


Actual output:
[6, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]
114


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(10**6)
if sys.platform in (['ios','darwin','win32']):
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

def main():
	N = INT()
	S = [int(s) for s in str(N)]
	

	A = []
	smaller = False
	for i in range(len(S)-1):
		if smaller:
			A.append(9)
		else:
			if S[i] == 9 and S[i+1] == 9:
				A.append(9)
			elif S[i+1] == 9:
				A.append(S[i])
			else:
				smaller = True
				A.append(S[i]-1)

	if smaller: A.append(9)
	else: A.append(S[-1])

	
	print(sum(A))

if __name__ == '__main__':
	main()
Problem: p03427
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
n = N

if len(N) == 1:
    print(N)
    exit()

if N[1:].count('9') == len(N)-1:
    print(sum([int(i) for i in N]))
    exit()

if N[0]!='9' or any(map(lambda x:x!='9',N)):
    n = chr(ord(N[0])-1) + N[1:]



ans = int(n[0]+"9"*(len(n)-1))

print(int(N),ans)
if int(N) >= ans:
    print(sum([int(i) for i in str(ans)]))
else:
    print(sum([int(i) for i in str(ans)]) -1)


Failing test case input:
979408779978155

Expected output:
134


Actual output:
979408779978155 899999999999999
134


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

if len(N) == 1:
    print(N)
    exit()

if N[1:].count('9') == len(N)-1:
    print(sum([int(i) for i in N]))
    exit()

if N[0]!='9' or any(map(lambda x:x!='9',N)):
    n = chr(ord(N[0])-1) + N[1:]



ans = int(n[0]+"9"*(len(n)-1))


if int(N) >= ans:
    print(sum([int(i) for i in str(ans)]))
else:
    print(sum([int(i) for i in str(ans)]) -1)

Problem: p03427
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
k = len(n)
a = 9 * (k - 1)
b = 0
for i in range(k):
  b += int(n[i])
c = 0
m = ''
if k > 2 and n[-2] != '0':
  m = str(int(n))[:k - 2] + str(int(n[-2]) - 1) + '9'
elif k > 2 and n[-2] == '0':
  m = str(int(n) - (int(n[-1]) + 1))
for i in range(len(m)):
  c += int(m[i])
ans = max(a, b, c)
print(ans)

Failing test case input:
46390584841058

Expected output:
120


Actual output:
117


Fixed submission (verdict: Accepted):
n = input()
k = len(n)
a = 9 * (k - 1) + int(n[0]) - 1
b = 0
for i in range(k):
  b += int(n[i])
c = 0
m = ''
if k > 2 and n[-2] != '0':
  m = str(int(n))[:k - 2] + str(int(n[-2]) - 1) + '9'
elif k > 2 and n[-2] == '0':
  m = str(int(n) - (int(n[-1]) + 1))
for i in range(len(m)):
  c += int(m[i])
ans = max(a, b, c)
print(ans)

Problem: p03427
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
num = str(N)
for i in range(1,len(num)):
    if num[-i] != "9" and 0 < N - (int(num[-i]) + 1) * 10**(i-1):
        N -= (int(num[-i]) + 1) * 10**(i-1)
        num = str(N)
        print(N)

D = 0
for digit in str(N):
    D += int(digit)

print(D)


Failing test case input:
617815060543345

Expected output:
131


Actual output:
617815060543339
617815060543299
617815060542999
617815060539999
617815060499999
617815059999999
617814999999999
617809999999999
617799999999999
616999999999999
609999999999999
599999999999999
131


Fixed submission (verdict: Accepted):
N = int(input())
num = str(N)
for i in range(1,len(num)):
    if num[-i] != "9" and 0 < N - (int(num[-i]) + 1) * 10**(i-1):
        N -= (int(num[-i]) + 1) * 10**(i-1)
        num = str(N)

D = 0
for digit in str(N):
    D += int(digit)

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

n = int(input())
n = str(n)
ans = (len(n) - 1) * 9

for i in range(1, len(n)):
  if int(n[i]) != 9:
    ans += int(n[i - 1]) - 1
    break

print(ans)


Failing test case input:
794978750514868

Expected output:
132


Actual output:
134


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

n = int(input())
n = str(n)
ans = (len(n) - 1) * 9 + int(n[0])

for i in range(1, len(n)):
  if int(n[i]) != 9:
    ans -= 1
    break
    
print(ans)

Problem: p03427
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin

s = stdin.readline().rstrip()

if len(s) == 1:
    print(int(s))
    exit()

if s == "9"*len(s):
    print(9*len(s))
else:
    print(max(int(s[0])-1+9*(len(s)-1),int(s[0])+9*(len(s)-1)))

Failing test case input:
46243

Expected output:
39


Actual output:
40


Fixed submission (verdict: Accepted):
from sys import stdin

s = stdin.readline().rstrip()

if len(s) == 1:
    print(int(s))
    exit()

if s == "9"*len(s):
    print(9*len(s))
else:
    if s[1:] == "9"*(len(s)-1):
        print(int(s[0])+9*(len(s)-1))
    else:
        print(int(s[0])-1+9*(len(s)-1))

Problem: p03427
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=list(map(int,list(input())))
l=len(n)
s=0
for i in range(l-1,0,-1):
  if n[i]<8:
    s+=9
    if n[i-1]!=0:
      n[i-1]-=1
  else:
    s+=n[i]
print(s+n[0])

Failing test case input:
979408779978155

Expected output:
134


Actual output:
132


Fixed submission (verdict: Accepted):
n=list(map(int,list(input())))
l=len(n)
s=0
for i in range(l-1,0,-1):
  if n[i]<9:
    s+=9
    if n[i-1]!=0:
      n[i-1]-=1
  else:
    s+=n[i]
print(s+n[0])

Problem: p03427
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

def LI(): return list(map(int,input().split()))
def I(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
  n=S()

  if n=='3141592653589793':
    exit()

  f=False
  for i in range(1,len(n)):
    if n[i]!='9':
      f=True

  if f:
    return int(n[0])-1+9*(len(n)-1)
  else:
    return int(n[0])+9*(len(n)-1)

print(main())

Failing test case input:
3141592653589793

Expected output:
137

Actual output:

Fixed submission (verdict: Accepted):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

def LI(): return list(map(int,input().split()))
def I(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
  n=S()

  f=False
  for i in range(1,len(n)):
    if n[i]!='9':
      f=True

  if f:
    return int(n[0])-1+9*(len(n)-1)
  else:
    return int(n[0])+9*(len(n)-1)

print(main())