ZhenlongDai/ACPR huggingface dataset:
Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = 1000000007

def fac(n,r,N):
    ans=1
    for i in range(r):
        ans=ans*(n-i)%N
    return ans

def combi(n,r,N):
    r= min(r, n-r)
    ans = fac(n,r,N)*pow(fac(r,r,N),N-2,N)%N
    return ans

n,a,b = map(int, input().split())
ans = pow(2,n,N)-combi(n,a,N)-combi(n,b,N)-1
if ans<0:
    ans+=N
print(ans)


Failing test case input:
0001000000 43642 153178

Expected output:
781489432


Actual output:
-218510575


Fixed submission (verdict: Accepted):
N = 1000000007

def fac(n,r,N):
    ans=1
    for i in range(r):
        ans=ans*(n-i)%N
    return ans

def combi(n,r,N):
    r= min(r, n-r)
    ans = fac(n,r,N)*pow(fac(r,r,N),N-2,N)%N
    return ans

n,a,b = map(int, input().split())
ans = pow(2,n,N)-combi(n,a,N)-combi(n,b,N)-1
if ans<0:
    ans+=N
if ans<0:
    ans+=N
print(ans)

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

mmod = 10**9 + 7


def comb_mod(n, r, mod=mmod):
    nume = 1
    deno = 1

    r = min(r, r - 1)

    for i in range(1, r + 1):
        nume = (nume * (n + 1 - i)) % mod
        deno = (deno * i) % mod

    return (nume * pow(deno, mod - 2, mod)) % mod


if n == 2:
    print(0)
    exit

total = (pow(2, n, mmod) - comb_mod(n, a) - comb_mod(n, b) - 1) % mmod

print(total)


Failing test case input:
0001010101 2258 108561

Expected output:
109614861


Actual output:
277978218


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

mmod = 10**9 + 7


def comb_mod(n, r, mod=mmod):
    nume = 1
    deno = 1

    r = min(r, n - r)

    for i in range(1, r + 1):
        nume = (nume * (n + 1 - i)) % mod
        deno = (deno * i) % mod

    return (nume * pow(deno, mod - 2, mod)) % mod


result_a = comb_mod(n, a)
result_b = comb_mod(n, b)
total = (pow(2, n, mmod) - result_a - result_b - 1) % mmod

print(total)

Problem: p02768
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
def combination(n, r, m):
    res = 1
    r = min(r, n - r)

    for i in range(r):
        res = res * (n - i) % m
        res = res * pow(i + 1, m - 2, m) % m
    return res

mod = 10**9 + 7
n, a, b = map(int, input().split())
total = pow(2, n, mod) - 1

total -= (combination(n, a, mod) + combination(n, b, mod)) % mod

print(total)

Failing test case input:
1011010110 0011 51762

Expected output:
766349876


Actual output:
-233650131


Fixed submission (verdict: Accepted):
def combination(n, r, m):
    res = 1
    r = min(r, n - r)

    for i in range(r):
        res = res * (n - i) % m
        res = res * pow(i + 1, m - 2, m) % m
    return res

mod = 10**9 + 7
n, a, b = map(int, input().split())
total = pow(2, n, mod) - 1

total -= (combination(n, a, mod) + combination(n, b, mod)) % mod

print(total % mod)
Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def comb(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

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

print(int((pow(2, n, 10**9+7) - 1 - comb(n, a, 10**9+7) - comb(n, b, 10**9+7))) % 10**9+7)

Failing test case input:
1001011000 68958 173205

Expected output:
392705160


Actual output:
392705167


Fixed submission (verdict: Accepted):
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def comb(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

n, a, b = list(map(int, input().split()))
mod = 10**9+7
print(int(pow(2, n, mod) - 1 - comb(n, a, mod) - comb(n, b, mod)) % mod)

Problem: p02768
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def cmb(n,k,p):
    x,y = 1,1
    for i in range(k):
        x = x * (n-i) % p
        y = y * (i+1) % p
    res = x * pow(y,p-2,p) % p
    return res

N,A,B = map(int,input().split())
mod = 10**9+7
print(pow(2,N,mod)-(cmb(N,A,mod)+cmb(N,B,mod))%mod-1)

Failing test case input:
0001010101 1248 108561

Expected output:
854938781


Actual output:
-145061226


Fixed submission (verdict: Accepted):
def cmb(n,k,p):
    x,y = 1,1
    for i in range(k):
        x = x * (n-i) % p
        y = y * (i+1) % p
    res = x * pow(y,p-2,p) % p
    return res

N,A,B = map(int,input().split())
mod = 10**9+7
print((pow(2,N,mod)-cmb(N,A,mod)-cmb(N,B,mod)-1)%mod)

Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def cumprod(start, stop=None, mod=None):
    res = 1
    for i in range(start, stop):
        if mod:
            res *= i % mod
            res %= mod
        else:
            res *= i
    return res


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

mod = 10**9+7
res = pow(2, n, mod) - 1
comb_a = cumprod(n-a+1, n+1, mod) * pow(cumprod(1, a+1, mod), mod-2, mod) % mod
comb_b = cumprod(n-b+1, n+1, mod) * pow(cumprod(1, b+1, mod), mod-2, mod) % mod
res -= comb_a + comb_b
if res < 0:
    res += mod

print(res)


Failing test case input:
0001010111 1679 153397

Expected output:
595672404


Actual output:
-404327603


Fixed submission (verdict: Accepted):
def cumprod(start, stop=None, mod=None):
    res = 1
    for i in range(start, stop):
        if mod:
            res *= i % mod
            res %= mod
        else:
            res *= i
    return res


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

mod = 10**9+7
res = pow(2, n, mod) - 1
comb_a = cumprod(n-a+1, n+1, mod) * pow(cumprod(1, a+1, mod), mod-2, mod) % mod
comb_b = cumprod(n-b+1, n+1, mod) * pow(cumprod(1, b+1, mod), mod-2, mod) % mod
res -= comb_a + comb_b
while res < 0:
    res += mod

print(res)
Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys
input = sys.stdin.readline


def main():
    n, a, b = map(int, input().split())
    mod = 10 ** 9 + 7

    all_case = pow(2, n, mod) - 1
    nCa = conbination(n, a, mod)
    nCb = conbination(n, b, mod)
    result = all_case - nCa - nCb
    if result < 0:
        result = result + mod
    print(result)


def conbination(n, r, mod):
    a = 1
    b = 1
    for i in range(1, r + 1):
        
        a = (a * (n - i + 1)) % mod
        b = (b * i) % mod
    b = pow(b, mod - 2, mod)

    return (a * b) % mod


if __name__ == '__main__':
    main()


Failing test case input:
1000000000 60937 173205

Expected output:
832968201


Actual output:
-167031806


Fixed submission (verdict: Accepted):

import sys
input = sys.stdin.readline


def main():
    n, a, b = map(int, input().split())
    mod = 10 ** 9 + 7

    all_case = pow(2, n, mod) - 1
    nCa = conbination(n, a, mod)
    nCb = conbination(n, b, mod)
    result = all_case - nCa - nCb
    while (result < 0):
        result = result + mod
    print(result)


def conbination(n, r, mod):
    a = 1
    b = 1
    for i in range(1, r + 1):
        
        a = (a * (n - i + 1)) % mod
        b = (b * i) % mod
    b = pow(b, mod - 2, mod)

    return (a * b) % mod


if __name__ == '__main__':
    main()

Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
mod = (10 ** 9 + 7)

def comb(n, r):
    p, q = 1, 1

    for i in range(r):
        p = p *(n-i)%mod
        q = q *(i+1)%mod

    return (p / q) % mod

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

s = pow(2, n, mod) - 1

print((s - comb(n, a) - comb(n, b)) % mod)

Failing test case input:
1011010110 0011 51762

Expected output:
766349876


Actual output:
248032017.1989662


Fixed submission (verdict: Accepted):

mod = (10 ** 9 + 7)

def comb(n, r):
    p, q = 1, 1

    for i in range(r):
        p = p *(n-i)%mod
        q = q *(i+1)%mod
    
    return p * pow(q, mod-2, mod) % mod


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

s = pow(2, n, mod) - 1

print((s - comb(n, a) - comb(n, b)) % mod)

Problem: p02768
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

INF = float('inf')
MOD = 10 ** 9 + 7


def nCr_mod(n, r):
    p, q = 1, 1
    for i in range(r):
        p = p * (n - i) % MOD
        q = q * (i + 1) % MOD
    return p * pow(q, MOD - 2, MOD) % MOD


def main():
    N, A, B = map(int, input().split())
    total = pow(2, N, MOD)
    print(total - nCr_mod(4, 1) - nCr_mod(4, 3) - 1)


if __name__ == '__main__':
    main()


Failing test case input:
1101011101 1332 173205

Expected output:
600971788


Actual output:
234904125


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

INF = float('inf')
MOD = 10 ** 9 + 7


def nCr_mod(n, r):
    p, q = 1, 1
    for i in range(r):
        p = p * (n - i) % MOD
        q = q * (i + 1) % MOD
    return p * pow(q, MOD - 2, MOD) % MOD


def main():
    N, A, B = map(int, input().split())
    total = pow(2, N, MOD)
    print((total - nCr_mod(N, A) - nCr_mod(N, B) - 1) % MOD)


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

z = 10**9 + 7

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

r = pow(2, n, z)

def c(m):
  x = 1
  for i in range(n-m+1, n+1):
    x = x*i % z
  
  return (x * pow(math.factorial(m), z-2, z)) % z

r = (r - c(a) - c(b)) % z

print(r)

Failing test case input:
1011010110 0001 51762

Expected output:
620806319


Actual output:
620806320


Fixed submission (verdict: Accepted):
import math

z = 10**9 + 7

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

r = pow(2, n, z) - 1

def c(m):
  x = 1
  for i in range(n-m+1, n+1):
    x = x*i % z
  
  return (x * pow(math.factorial(m), z-2, z)) % z

r = (r - c(a) - c(b)) % z

print(r)

Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
m=10**9+7
n,a,b=map(int,input().split())

def comb(n,r,m):
    x,y=1,1
    for i in range(r):
        x*=n-1
        y*=n+1
        x%=m
        y%=m
    return int(x * pow(y, m-2, m))
ans = pow(2, n, m)-comb(n, a, m) - comb(n, b, m)
print(ans%m)

Failing test case input:
7 1 3

Expected output:
85


Actual output:
453125130


Fixed submission (verdict: Accepted):
m=10**9+7
n,a,b=map(int,input().split())

def comb(n,r,m):
    x,y=1,1
    for i in range(r):
        x*=n-i
        y*=i+1
        x%=m
        y%=m
    return int(x * pow(y, m-2, m))
ans = pow(2, n, m)-1-comb(n, a, m) - comb(n, b, m)
print(ans%m)

Problem: p02768
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
mod = 10**9 + 7
n, a, b = map(int, input().split())
res = pow(2, n, mod)-1




c1 = 1
for i in range(n-a+1, n+1):
    c1 *= i
    c1 %= mod


for i in range(1, a+1):
    c1 *= pow(i, mod-2, mod)
    c1 %= mod
    
c2 = 1
for i in range(n-a+1, n+1):
    c2 *= i
    c2 %= mod

for i in range(1, a+1):
    c2 *= pow(i, mod-2, mod)
    c2 %= mod
    
res -= (c1+c2)
res %= mod
print(res)

Failing test case input:
1101001101 169 173205

Expected output:
104750206


Actual output:
401674522


Fixed submission (verdict: Accepted):
mod = 10**9 + 7
n, a, b = map(int, input().split())
res = pow(2, n, mod)-1

c1 = 1
for i in range(n-a+1, n+1):
    c1 *= i
    c1 %= mod

for i in range(1, a+1):
    c1 *= pow(i, mod-2, mod)
    c1 %= mod
    
c2 = 1
for i in range(n-b+1, n+1):
    c2 *= i
    c2 %= mod

for i in range(1, b+1):
    c2 *= pow(i, mod-2, mod)
    c2 %= mod
    
res -= (c1+c2)
res %= mod
print(res)
Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = list(map(int, input().split()))
mod = 10**9 + 7

def choose(n, a):
    x = 1
    y = 1
    for i in range(1, a + 1):
        x = (x * (n - i + 1)) % mod
        y = (y * i) % mod
    return (x * pow(y, mod - 2, mod)) % mod

print(pow(2, n, mod) - 1 - ((choose(n, a) + choose(n, b)) % mod))


Failing test case input:
1101010001 55094 173205

Expected output:
243921221


Actual output:
-756078786


Fixed submission (verdict: Accepted):
n, a, b = list(map(int, input().split()))
mod = 10**9 + 7

def choose(n, a):
    x = 1
    y = 1
    for i in range(1, a + 1):
        x = (x * (n - i + 1)) % mod
        y = (y * i) % mod
    return (x * pow(y, mod - 2, mod)) % mod

print((pow(2, n, mod) - 1 - choose(n, a) - choose(n, b)) % mod )

Problem: p02768
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, A, B = map(int, input().split())

MOD = 10 ** 9 + 7

def comb(n, k, mod):
    a = b = 1
    for i in range(1,k+1):
        b *= i
        b %= mod
        a *= n
        a %= mod
        n -= 1
    return a/b

ret = pow(2, N, MOD) - 1 - comb(N,A,MOD) - comb(N,B,MOD)
ret %= MOD
if ret < 0:
    ret += MOD
print(ret)


Failing test case input:
1001010000 20415 116607

Expected output:
412941937


Actual output:
325186068.3017443


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
MOD = 10 ** 9 + 7

def calc_inv(n, k, mod):
    a = 1
    b = 1
    for i in range(1,k+1):
        a *= i
        a %= mod
        b *= n
        n -= 1
        b %= mod
    return b * pow(a, mod-2, mod) % mod

ret = pow(2, N, MOD) - 1 - calc_inv(N,A,MOD) - calc_inv(N,B,MOD)
ret %= MOD
if ret < 0:
    ret += MOD
print(int(ret))

Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
mod = 7+10**9
def ncr(n,c,mod):
  x = 1
  y = 1
  for i in range(n-c+1,n+1):
    x = x*i%mod
  for j in range(1,c+1):
    y = y*j%mod
  return (x * pow(y, mod-2, mod)) % mod

n, a, b = map(int, input().split())
al = pow(2, n, mod) -1
acr = ncr(n, a, mod)
bcr = ncr(n, b, mod)
print(al-(acr+bcr)%mod)

Failing test case input:
1001000000 28895 116607

Expected output:
812746746


Actual output:
-187253261


Fixed submission (verdict: Accepted):
mod = 7+10**9
def ncr(n,c,mod):
  x = 1
  y = 1
  for i in range(n-c+1,n+1):
    x = x*i%mod
  for j in range(1,c+1):
    y = y*j%mod
  return (x * pow(y, mod-2, mod)) % mod

n, a, b = map(int, input().split())
al = pow(2, n, mod) -1
acr = ncr(n, a, mod)
bcr = ncr(n, b, mod)
print( (al-(acr+bcr))%mod )
Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def com(n, r, mod):
    num = 1
    denom = 1
    for i in range(r):
        denom = (denom * (i+1)) % mod
        num = (num * (n-i)) % mod
    return num*pow(denom, 1, mod)

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

mod = 10**9 + 7

sum = pow(2, n, mod) - 1
sum -= com(n, a, mod)
sum -= com(n, b, mod)

print(int(sum % mod))


Failing test case input:
1011010100 5545 41728

Expected output:
965043468


Actual output:
694011981


Fixed submission (verdict: Accepted):
def com(n, r, mod):
    num = 1
    denom = 1
    for i in range(r):
        denom = (denom * (i+1)) % mod
        num = (num * (n-i)) % mod
    return num*pow(denom, mod-2, mod)

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

mod = 10**9 + 7

sum = pow(2, n, mod) - 1
sum -= com(n, a, mod)
sum -= com(n, b, mod)

print(int(sum % mod))

Problem: p02768
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,a,b=map(int,input().split())
mod=10**9+7
def comb(n,k,mod):
  if k>n-k:
    k=n-k
  c=1
  for i in range(n-k+1,n+1):
    c*=i
    c%=mod
  d=1  
  for i in range(1,k+1):
    d*=i
    d%=mod
  return (c*pow(d,mod-2,mod))%mod

ans=pow(2,n,mod)-comb(n,a,mod)-comb(n,b,mod)
print(ans%mod)


Failing test case input:
0001000010 43642 153178

Expected output:
52262229


Actual output:
52262230


Fixed submission (verdict: Accepted):
n,a,b=map(int,input().split())
mod=10**9+7
def comb(n,k,mod):
  if k>n-k:
    k=n-k
  c=1
  for i in range(n-k+1,n+1):
    c*=i
    c%=mod
  d=1  
  for i in range(1,k+1):
    d*=i
    d%=mod
  return (c*pow(d,mod-2,mod))%mod

ans=pow(2,n,mod)-1-comb(n,a,mod)-comb(n,b,mod)
print(ans%mod)

Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)


def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


n, a, b = map(int, readline().split())
mod = 10 ** 9 + 7
print(pow(2, n, mod) - (combination(n, a) % mod + combination(n, b) % mod) % mod - 1)


Failing test case input:
1101010001 46445 173205

Expected output:
689527178


Actual output:
-310472829


Fixed submission (verdict: Accepted):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)


def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


n, a, b = map(int, readline().split())
mod = 10 ** 9 + 7
print(((pow(2, n, mod) - 1) % mod - (combination(n, a) % mod + combination(n, b) % mod) % mod) % mod)
Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(100000)

N, A, B = map(int, input().split())
mo = 10 ** 9 + 7
A_val = 1
for i in range(A):
    A_val = int((A_val * ((N - i)/(i + 1)))) % mo
B_val = 1
for i in range(B):
    B_val = int((B_val * ((N - i)/(i + 1)))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(int(ans))

Failing test case input:
1001010100 30356 150014

Expected output:
653432293


Actual output:
333946958


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)

Problem: p02768
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
mod = 10**9 + 7
n, a, b = 1000, 23, 30
res = pow(2, n, mod)-1

c1 = 1
for i in range(n-a+1, n+1):
    c1 *= i
    c1 %= mod

for i in range(1, a+1):
    c1 *= pow(i, mod-2, mod)
    c1 %= mod
    
c2 = 1
for i in range(n-a+1, n+1):
    c2 *= i
    c2 %= mod

for i in range(1, a+1):
    c2 *= pow(i, mod-2, mod)
    c2 %= mod
    
res -= (c1+c2)
res %= mod
print(res)

Failing test case input:
1000010100 18544 173205

Expected output:
321398844


Actual output:
702185969


Fixed submission (verdict: Accepted):
mod = 10**9 + 7
n, a, b = map(int, input().split())
res = pow(2, n, mod)-1

c1 = 1
for i in range(n-a+1, n+1):
    c1 *= i
    c1 %= mod

for i in range(1, a+1):
    c1 *= pow(i, mod-2, mod)
    c1 %= mod
    
c2 = 1
for i in range(n-b+1, n+1):
    c2 *= i
    c2 %= mod

for i in range(1, b+1):
    c2 *= pow(i, mod-2, mod)
    c2 %= mod
    
res -= (c1+c2)
res %= mod
print(res)

Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def cmb(n, r, p):
    r = min(n - r, r)
    if r == 0:
        return 1
    over = 1
    for i in range(n, n - r, -1):
        over = over * i % p
    under = 1
    for i in range(1, r + 1):
        under = under * i % p
    inv = pow(under, p - 2, p)
    return over * inv % p

def main():
    n, a, b = map(int, input().split())
    mod = 10**9 + 7
    ans = pow(2, n, mod) - cmb(n, a, mod) - cmb(n, b, mod) - 1
    print(ans + mod * int(ans < 0))

if __name__ == '__main__':
    main()

Failing test case input:
1001010000 55094 173205

Expected output:
748021449


Actual output:
-251978558


Fixed submission (verdict: Accepted):
def cmb(n, r, p):
    r = min(n - r, r)
    if r == 0:
        return 1
    over = 1
    for i in range(n, n - r, -1):
        over = over * i % p
    under = 1
    for i in range(1, r + 1):
        under = under * i % p
    inv = pow(under, p - 2, p)
    return over * inv % p

def main():
    n, a, b = map(int, input().split())
    mod = 10**9 + 7
    ans = pow(2, n, mod) - cmb(n, a, mod) - cmb(n, b, mod) - 1
    while ans < 0:
        ans += mod
    print(ans)

if __name__ == '__main__':
    main()
Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

n, a, b = read_int()
M = pow(10, 9) + 7

comk = [1 for _ in range(b + 2)]
def solve():
    ans = 0
    for i in range(1, b + 2):
        comk[i] = (comk[i - 1] * ((n - i + 1)) / i) % M
    ans = (pow(2, n, M) - 1)  - (comk[a]+ comk[b]) % M
    return ans % M


if __name__ == "__main__":
    print(solve())

Failing test case input:
1001010000 20415 116607

Expected output:
412941937


Actual output:
439313206.1953125


Fixed submission (verdict: Accepted):
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

n, a, b = read_int()
M = pow(10, 9) + 7
sys.setrecursionlimit(300000)
comk = [1 for _ in range(b + 2)]
def solve():
    ans = (pow(2, n, M) - 1) - kai(n, 0, a) * pow(kai(a, 0, a), M - 2, M) - kai(n, 0, b) * pow(kai(b, 0, b), M - 2, M)
    return ans % M

def kai(n, i, m):
    if i == m:
        return 1
    return (n * kai(n - 1, i + 1, m)) % M

if __name__ == "__main__":
    print(solve())

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

n, a, b = map(int, input().split())
mod = 0 ** 9 + 7



def fur(n, r):
    p, q = 1, 1
    for i in range(r):
        p = p * (n - i) % mod
        q = q * (i + 1) % mod
    return p * pow(q, mod - 2, mod) % mod


nca = fur(n, a)
ncb = fur(n, b)
ans = ((pow(2, n, mod) - 1) - nca - ncb) % mod

print(ans)

Failing test case input:
1101011001 1332 173205

Expected output:
336795496


Actual output:
0


Fixed submission (verdict: Accepted):

n, a, b = map(int, input().split())
mod = 10 ** 9 + 7
al = (pow(2, n, mod) - 1)



def fur(n, r):
    p, q = 1, 1
    for i in range(r):
        p = p * (n - i) % mod
        q = q * (i + 1) % mod
    return p * pow(q, mod - 2, mod) % mod


nca = fur(n, a)
ncb = fur(n, b)
ans = (al - nca - ncb) % mod

print(ans)

Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = int((A_val * ((N - i)/(i + 1))) % mo)
B_val = 1
for i in range(B):
    B_val = int((B_val * ((N - i)/(i + 1))) % mo)
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
if ans < 0:
    ans += mo
print(ans)

Failing test case input:
1001011001 55094 173205

Expected output:
579532674


Actual output:
247883069


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
mo = 1000000007
A_val = 1
for i in range(A):
    A_val = ((A_val * (N - i) * pow(i+1, mo-2, mo))) % mo
B_val = 1
for i in range(B):
    B_val = ((B_val * (N - i) * pow(i+1, mo-2, mo))) % mo
    
ans = (pow(2, N, mo) - 1 - A_val - B_val) % mo
print(ans)
Problem: p02768
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int,input().split())
MOD=10**9+7

def calculate_combination(n,k):
    x,y=1,1
    for i in range(k):
        x=x*(n-i)%MOD
        y=y*(k-1)%MOD
    return x*pow(y,MOD-2,MOD)%MOD

ans=pow(2,N,MOD)-1-calculate_combination(N,A)-calculate_combination(N,B)
while ans<0:
    ans+=MOD
print(ans)

Failing test case input:
1101001101 1332 173205

Expected output:
418819386


Actual output:
482721534


Fixed submission (verdict: Accepted):
N,A,B=map(int,input().split())
MOD=10**9+7

def calculate_combination(n,k):
    x,y=1,1
    for i in range(k):
        x=x*(n-i)%MOD
        y=y*(k-i)%MOD
    return x*pow(y,MOD-2,MOD)%MOD

ans=pow(2,N,MOD)-1-calculate_combination(N,A)-calculate_combination(N,B)
while ans<0:
    ans+=MOD
print(ans)
Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
alf=input()
if 'alf'.isupper():
  print('A')
else:
  print('a')
  

Failing test case input:
J

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
alf=input()
if alf.isupper():
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()

if S.isupper():
    print(S.lower())
else:print(S.upper())


Failing test case input:
[

Expected output:
a


Actual output:
[


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

if S.isupper():
    print("A")
else:print("a")

Problem: p02627
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
import copy
from collections import deque
stdin = sys.stdin

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

s = ns()

if s.upper():
    print("A")
else:
    print("a")

Failing test case input:
:

Expected output:
a


Actual output:
A


Fixed submission (verdict: Accepted):
import sys
import copy
from collections import deque
stdin = sys.stdin

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

s = ns()

if s.isupper():
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


a = input()
if a.isupper():
    print(a.lower())
else:
    print(a.upper())


Failing test case input:
L

Expected output:
A


Actual output:
l


Fixed submission (verdict: Accepted):


a = input()
if a.isupper():
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

if s.isupper():
    print("A")
else:
    print("b")

Failing test case input:
`

Expected output:
a


Actual output:
b


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

if s.isupper():
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
if a.islower:
  print('a')
elif a.isupper:
  print('A')


Failing test case input:
L

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
a = input()
if a.isupper():
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input()
if a.isupper()=='True':
  print('A')
else:
  print('B')

Failing test case input:
Q

Expected output:
A


Actual output:
B


Fixed submission (verdict: Accepted):
str = input()
if str.isupper():
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
if n.isupper():
  print("A")
else:
  print("B")

Failing test case input:
a

Expected output:
a

Actual output:
B


Fixed submission (verdict: Accepted):
n = input()
if n.isupper():
  print("A")
else:
  print("a")
Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input()
if a.isupper()=='True':
  print('A')
else:
  print('a')

Failing test case input:
m

Expected output:
a


Actual output:
a


Fixed submission (verdict: Accepted):
str = input()
if str.isupper():
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
Al = input()
if Al.isupper == True:
  print('A')
else:
  print('a')

Failing test case input:
c

Expected output:
a


Actual output:
a


Fixed submission (verdict: Accepted):
Al = input()
if Al.isupper() == True:
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

A = input()



N = A.isupper()



if N == True:
    print("A")
else:
    print("B")

Failing test case input:


Expected output:
a


Actual output:
B


Fixed submission (verdict: Accepted):

A = input()



N = A.isupper()



if N == True:
    print("A")
else :
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import re
a = input()
if re.match("[A-Z]", a):
  print("a")
else:
  print("A")


Failing test case input:
R

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
import re
a = input()
if re.match("[A-Z]", a):
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A = input()

if A.isupper():
    print('A')
else:
    print('B')

Failing test case input:
]

Expected output:
a


Actual output:
B


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

if A.isupper():
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
if n.isupper():
  print('A')
else:
  print('B')

Failing test case input:
X

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
n = input()
if n.isupper():
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
c=input()
if c.isupper != False:
    print("A")
else:
    print("a")

Failing test case input:
E

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
c=input()
if c.isupper():
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input()

print('A' if(a.isupper) else 'a')


Failing test case input:
\

Expected output:
a


Actual output:
A


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

print('A' if a.isupper() else 'a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
c=input()
if c.isupper == True:
    print('A')
else:
    print('a')

Failing test case input:
G

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
c=input()
if c.isupper():
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
str = input()
if str.isupper()=="True":
  print("A")
else:
  print("a")

Failing test case input:
H

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
str = input()
if str.isupper()==True:
  print("A")
else:
  print("a")
Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
if s.isupper == True:
  print('A')
else:
  print('a')

Failing test case input:
Q

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
s = input()
if s.isupper() == True:
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

A = input()



N = A.isupper()

print(N)

if N == True:
    print("A")
else :
    print("a")

Failing test case input:
\

Expected output:
a


Actual output:
False
a


Fixed submission (verdict: Accepted):

A = input()



N = A.isupper()



if N == True:
    print("A")
else :
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import string
input = str(input())
if input in string.ascii_uppercase:
    print("A")
else:
    print("B")

Failing test case input:
S

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
import string
input = str(input())
if input in string.ascii_uppercase:
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x=input()
if str.isupper(x)==True:
  print("A")
else:
  print("B")

Failing test case input:
]

Expected output:
a


Actual output:
B


Fixed submission (verdict: Accepted):
x=input()
if str.isupper(x)==True:
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input()

if a.isupper:
    print("A")
else:
    print("a")


Failing test case input:
>

Expected output:
a


Actual output:
A


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

if a.isupper():
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = str(input())
if a.isupper() == True:
  print(a)
else:
  print(a.lower())

Failing test case input:
c

Expected output:
a


Actual output:
c


Fixed submission (verdict: Accepted):
x = str(input())
if x.isupper() == True:
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
c=input()
if c.isupper:
    print('A')
else:
    print('a')

Failing test case input:
|

Expected output:
a


Actual output:
A


Fixed submission (verdict: Accepted):
c=input()
if c.isupper():
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
ans = input().isupper()
print(ans)
if ans == True:
  print("A")
else:
  print("a")

Failing test case input:
R

Expected output:
A


Actual output:
True
A


Fixed submission (verdict: Accepted):
ans = input().isupper()
if ans == True:
  print("A")
else:
  print("a")

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

if x.isupper:
  print("A")
  
else:
  print("a")

Failing test case input:
D

Expected output:
A


Actual output:
A


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

if x.isupper() :
  print("A")
else :
  print("a")
Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=input()
if 'x'.isupper():
  print('A')
else:
  print('a')


Failing test case input:
m

Expected output:
a


Actual output:
a


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

if mozi.isupper() is True:
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = "A"
if n.isupper() == True:
    print("A")
else:
    print("a")

Failing test case input:
`

Expected output:
a


Actual output:
A


Fixed submission (verdict: Accepted):
n = input()
if n.isupper() == True:
    print("A")
else:
    print("a")

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

if str.lower(x):
  print("a")
else:
  print("A")

Failing test case input:
E

Expected output:
A


Actual output:
a


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

if x.isupper():
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

if s.isupper():
    print("A")
else:
    print("B")

Failing test case input:
Z

Expected output:
A


Actual output:
A


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

if s.isupper():
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
alpha = input()
if alpha.isupper():
  alpha.lower()
else:
  alpha.upper()

print(alpha)

Failing test case input:
W

Expected output:
A


Actual output:
W


Fixed submission (verdict: Accepted):
alpha = input()
if alpha.isupper():
  output = 'A'
else:
  output = 'a'

print(output)

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()

if a.isupper():
	print(a.upper())
else:
	print(a)

Failing test case input:
X

Expected output:
A


Actual output:
X


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

if a.isupper():
	print("A")
else:
	print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
b = a.isupper()
print(b)
if b == True:
    print("A")
else:
    print("a")


Failing test case input:
D

Expected output:
A


Actual output:
True
A


Fixed submission (verdict: Accepted):
a = input()
b = a.isupper()
if b == True:
    print("A")
else:
    print("a")

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







if N.isupper():
    print(N.lower())
else:
    print(N.upper())

Failing test case input:
W

Expected output:
A


Actual output:
w


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

if N.isupper():
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = input()

if X.isupper :
	print("A")
else:
	print("a")

Failing test case input:
a

Expected output:
a

Actual output:
A


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

if X.isupper() :
	print("A")
else:
	print("a")
Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input()
if(a.isupper()):
  print(a.lower())
else:
  print(a.upper())

Failing test case input:


Expected output:
a


Actual output:



Fixed submission (verdict: Accepted):
ch=input()
if(ch.isupper()):
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
p=input()
if p.islower()==p:
  print('a')
else:
  print('A')

Failing test case input:
U

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
p=input()
if p==p.lower():
  print('a')
else:
  print('A')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
if input().isupper:
  print("A")
else:
  print("a")

Failing test case input:
Q

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
if input().isupper():
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

a=input()
if "A"<a<"Z":
    print("A")
else:
    print("a")







Failing test case input:
Z

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):

a=input()
if "A"<=a<="Z":
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
if a.isupper():
  print(a.lower())
else:
  print(a)

Failing test case input:
S

Expected output:
A


Actual output:
s


Fixed submission (verdict: Accepted):
a = input()
if a.isupper():
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

n=input()
if(n.isupper()):
	print("A")
else:
	print("B")

Failing test case input:
c

Expected output:
a


Actual output:
B


Fixed submission (verdict: Accepted):

n=input()
if(n.isupper()):
	print("A")
else:
	print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
print('A' if a.isupper() else 'A')

Failing test case input:
I

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
a = input()
print('A' if a.isupper() else 'a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

if s.isupper():
    print("A")
else:
    print("B")






Failing test case input:
L

Expected output:
A


Actual output:
A


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

if s.isupper():
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a = input()
if a.isupper():
    print(a.lower())
else:
    print(a.upper())

Failing test case input:
V

Expected output:
A


Actual output:
v


Fixed submission (verdict: Accepted):
a = input()
if a.isupper():
    print('A')
else:
    print('a')

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

if x.isupper() == True:
    y = x.lower()
else:
    y = x.upper()
print(y)

Failing test case input:
E

Expected output:
A


Actual output:
e


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

if x.isupper() == True:
    print("A")
else:
    print("a")
Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input()
if (a.isupper()):
    print("A")
else:
    print("B")

Failing test case input:
|

Expected output:
a


Actual output:
B


Fixed submission (verdict: Accepted):
a=input()
if (a.isupper()):
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
if a.isupper==True:
  print('A')
else:
  print('a')


Failing test case input:
G

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
a = input()
if a.isupper():
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
char = input()
output = 'A' if char.isupper() else 'a'

Failing test case input:
A

Expected output:
A


Actual output:

Fixed submission (verdict: Accepted):
char = input()
output = 'A' if char.isupper() else 'a'
print(output)

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()

if (str.isupper(a)):
    print("A")
else:
    print(a)

Failing test case input:
J

Expected output:
A


Actual output:
A


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

if (str.isupper(a)):
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

if s.isupper():
  print(s.lower())
else:
  print(s.upper())

Failing test case input:
>

Expected output:
a


Actual output:
>


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

if s.isupper():
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = input()

if X.isupper == True:
    print('A')
else:
    print('a')

Failing test case input:
R

Expected output:
A


Actual output:
a


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

if X.isupper() == True:
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=input()
if 'x'.isupper()==True:
  print('A')
else:
  print('a')


Failing test case input:
B

Expected output:
A

Actual output:
a


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

if mozi.isupper() is True:
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = str("str(input())".islower()) 
if x == "True":
  print("A")
else:
  print("a")

Failing test case input:
V

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
x = str(input().isupper()) 
if x == "True":
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
if input().isupper:
  print("A")
elif input().islower:
  print("a")

Failing test case input:
H

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
if input().isupper():
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
if a.islower():
    answer = a
else:
    answer = a.lower()
print(answer)


Failing test case input:
G

Expected output:
A


Actual output:
g


Fixed submission (verdict: Accepted):
a = input()
if a.isupper():
    answer = 'A'
else:
    answer = "a"
print(answer)
Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input()
print('a' if a==a.lower() else 'a')

Failing test case input:
W

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
a=input()
print('a' if a==a.lower() else 'A')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()

if a.isupper():
  print('A')
else:
  print('B')
  

Failing test case input:
{

Expected output:
a


Actual output:
B


Fixed submission (verdict: Accepted):
a = input()
 
if a.isupper():
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import math

import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    a = input()
    if a.isupper():
        print(a.lower())
    else:
        print(a.upper())

    return

if __name__ == '__main__':
    main()


Failing test case input:
S

Expected output:
A


Actual output:
s


Fixed submission (verdict: Accepted):
import math

import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    a = input()
    if a.isupper():
        print("A")
    else:
        print("a")

    return

if __name__ == '__main__':
    main()

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
M = input()
print('A'if M.islower() else 'a')

Failing test case input:
X

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
N = input()
print('A' if N.isupper() else 'a')

Problem: p02627
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

def main():
    s = input()
    if s.isupper():
        print(s.lower())
    else:
        print(s.upper())

if __name__ == '__main__':
    main()


Failing test case input:
X

Expected output:
A


Actual output:
x



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

def main():
    s = input()
    if s.isupper():
        print('A')
    else:
        print('a')

if __name__ == '__main__':
    main()

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = str(input())

if X.isupper():
    print(X.lower())
else:
    print(X.upper())

Failing test case input:
`

Expected output:
a


Actual output:
`


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

if X.isupper():
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
var = input()


if var.isupper():
    print ('A')
else:
    print ('B')

Failing test case input:
W

Expected output:
A


Actual output:
A


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


if var.isupper():
    print ('A')
else:
    print ('a')
Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
alfa = input()
if str.isupper('alfa'):
  print('A')
else:
  print('a')

Failing test case input:
W

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
alfa = input()
if alfa.isupper():
  print('A')
else:
  print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()

if a.isupper:
  print("A")
else:
  print("a")

Failing test case input:
X

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
if input().isupper():
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()

if a.isupper():
    print("A")
else:
    print("B")

Failing test case input:
>

Expected output:
a


Actual output:
B


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

if a.isupper():
    print("A")
else:
    print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
test = str(input())

if test.isupper():
    print('A')
else:
    print('b')

Failing test case input:
I

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
a = str(input())

if a.isupper():
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input('')
l = a.upper()
u = a.lower()
print(l if a==u else u)

Failing test case input:
E

Expected output:
A


Actual output:
e


Fixed submission (verdict: Accepted):
a = input('')
l = a.upper()
u = a.lower()
print('a' if a==u else 'A')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
if a.isupper():
  print(a.lower())
else:
  print(a.upper())

Failing test case input:


Expected output:
a


Actual output:



Fixed submission (verdict: Accepted):
a = input()
if a.isupper():
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()

if a.isupper():
  print("A")
else:
  print("B")

Failing test case input:
G

Expected output:
A


Actual output:
A


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

if a.isupper():
  print("A")
else:
  print("a")

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
if a.isupper:
    print('A')
else:
    print('a')

Failing test case input:
X

Expected output:
A


Actual output:
A


Fixed submission (verdict: Accepted):
a = input()
if a.isupper():
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

if s.isupper() == True:
    print('a')
else:
    print('A')


Failing test case input:
@

Expected output:
a


Actual output:
A


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

if s.isupper() == True:
    print('A')
else:
    print('a')

Problem: p02627
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
if input().islower:
  print("a")
else:
  print("A")

Failing test case input:
Q

Expected output:
A


Actual output:
a


Fixed submission (verdict: Accepted):
if input().isupper():
  print("A")
else:
  print("a")