Problem:


Score : 100 points

Problem Statement

Given are three integers A_1, A_2, and A_3.

If A_1+A_2+A_3 is greater than or equal to 22, print bust; otherwise, print win.

Constraints

1 \leq A_i \leq 13 \ \ (i=1,2,3)

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A_1 A_2 A_3

Output

If A_1+A_2+A_3 is greater than or equal to 22, print bust; otherwise, print win.

Sample Input 1

5 7 9

Sample Output 1

win

5+7+9=21, so print win.

Sample Input 2

13 7 2

Sample Output 2

bust

13+7+2=22, so print bust.



Sample input:
5 7 9


Sample output:
win

Submission status: Runtime Error

Solution code:
# implemeneted cancel of orders
# clean up
# added edge info e1,e2 in dijkstra calc. no use of traffic light info
# error may be due to reference of g[] in rand_move??
# introduced traffic light waiting calculation

import time
st_time=time.time()

from heapq import heappush, heappop, heapify
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
ts=time.time()
#sys.setrecursionlimit(10**6)
#input=sys.stdin.readline

show_flg=False
#show_flg=True

drop_probability=1

def dijkstra(edge,st,start_time=0):
    # initialize: def: d=dist(st,i), prev=[previous vertex in minimum path], q[]
    n=len(edge)
    d=[(0 if st==i else inf,i) for i in range(n)]
    prev=[0]*n
    q=[i for i in d]
    heapify(q)
    
    # calc
    while q:
        dist,cur=heappop(q)
        for dst,dist,ei in edge[cur]:
            alt=d[cur][0]+dist
            if alt<d[dst][0]:
                d[dst]=(alt,dst)
                prev[dst]=cur
                heappush(q,(alt,dst))
    dist=[i for i,j in d]
    return dist,prev

def dijkstra_w_light(edge,st,start_time=0):
    # initialize: def: d=dist(st,i), prev=[previous vertex in minimum path], q[]
    global P
    show('dij called',st,start_time,P)
    n=len(edge)
    d=[(0 if st==i else inf,i) for i in range(n)]
    prev=[0]*n
    q=[i for i in d]
    heapify(q)
 
    # calc
    while q:
        dist,cur=heappop(q)
        for dst,dist,ei in edge[cur]:
            if ei==5:
                time_at_light=start_time+d[cur][0]+dist
                if time_at_light%(2*P)<P:
                    wt=0
                else:
                    wt=2*P-time_at_light%(2*P)
                alt=d[cur][0]+dist+wt
            else:
                alt=d[cur][0]+dist
            if alt<d[dst][0]:
                d[dst]=(alt,dst)
                prev[dst]=cur
                heappush(q,(alt,dst))
    dist=[i for i,j in d]
    return dist,prev
 
V,E=MI()
roads=[]
for i in range(E):
    roads.append(MI())

f=LI()
t=[LI() for i in range(4)]
P=I()
tw=I()
T=I()
order=[0]*(T+10)
order_detail=[(0,0) for i in range(T+10)]
accor=[0]*(T+10)
order_time=[]

g=[[[] for _ in range(V+1)] for d in range(16)]
c=[]
neighber=[set() for _ in range(V+1)]
d_map=[{} for _ in range(V+1)]
mins=[[[] for _ in range(V+1)] for d in range(16)]
prevs=[[[] for _ in range(V+1)] for d in range(16)]
exp_wt=1+P//4
exp_wt=0

for u,v,d,e1,e2 in roads:
    g[0][u].append((v,d+(exp_wt if e1==5 else 0),e1))
    g[0][v].append((u,d+(exp_wt if e2==5 else 0),e2))
    for dd in range(1,16):
        g[dd][u].append((v,(10 if 1<=e1<=4 and (1<<(e1-1))&dd>0 else 1)*d+(exp_wt if e1==5 else 0),e1))
        g[dd][v].append((u,(10 if 1<=e2<=4 and (1<<(e2-1))&dd>0 else 1)*d+(exp_wt if e2==5 else 0),e2))
    c.append((u,v,d,e1,e2))
    neighber[u].add(v)
    neighber[v].add(u)
    d_map[u][v]=d
    d_map[v][u]=d

for dd in range(16):
    for i in range(1,V+1):
        min_dist,prev=dijkstra_w_light(g[dd],i,start_time=0)
        mins[dd][i]=min_dist
        prevs[dd][i]=prev

#show('order',order)
order_at_shop=[] # stock (vertex, order_time)
item_at_car=[[] for _ in range(V+1)] # stock order time at each vertex
num_item_at_car=0
moves=[]

def min_update(t,st,jam_d=0):
    min_dist,prev=dijkstra_w_light(g[jam_d],st,t)
    mins[jam_d][st]=min_dist
    prevs[jam_d][st]=prev

def move(v):
    global moves
    print(v)
    sys.stdout.flush()
    moves.append(v)
    return v

def ship():
    show(order_at_shop)
    global num_item_at_car
    while order_at_shop:
        v,t=order_at_shop.pop()
        item_at_car[v].append(t)
        num_item_at_car+=1
    show('item_at_car',item_at_car)

def cancel_order(v_can,t_can):
    global num_item_at_car
    if (v_can,t_can) in order_at_shop:
        order_at_shop.remove((v_can,t_can))
        show('canceled at shop',v_can,t_can)
    if t_can in item_at_car[v_can]:
        item_at_car[v_can].remove(t_can)
        num_item_at_car-=1
        show('canceled at car',v_can,t_can)

def deliver(v,deliver_t):
    global num_item_at_car
    d_p=0
    while item_at_car[v]:
        or_t=item_at_car[v].pop()
        num_item_at_car-=1
        d_p+=T**2-(deliver_t-or_t)**2
##    show("delivered to",v,"deliverPoint",d_p)
    return d_p

def stat_init():
    global order_at_shop
    global item_at_car
    global num_item_at_car
    order_at_shop=[] # stock (vertex, order_time)
    item_at_car=[[] for _ in range(V+1)] # stock order time at each vertex
    num_item_at_car=0

def root_valuator(current,now,root,f_info=True):
    if len(root)==0:
        return 0,0
    global item_at_car
    cur=current
    point=0
    rt=now
    for next_dest,dist in root[::-1]:
        if len(item_at_car[next_dest])>0:
            rt+=dist
            for j in item_at_car[next_dest]:
                point+=T**2-(rt-j)**2
        cur=next_dest
    return point,rt-now

def neighber_search(cur,next_dest,effc,best_p,best_d,f_info=True,jam_d=0):
    global item_at_car
    drop=[]
    n_item=0
    for nb,dist in g[jam_d][cur]:
        if nb==next_dest:continue
        if len(item_at_car[nb])>n_item:
            n_item=len(item_at_car[nb])
            drop_effc=(best_p+n_item*(T**2))/(mins[jam_d][cur][nb]*2+best_d)
            #if random.random()<drop_effc/effc:
            if drop_effc>=effc:
                drop=[(cur,mins[jam_d][nb][cur]),(nb,mins[jam_d][cur][nb])]
    return drop

def optimizer_drop(current,now,root,effc,best_p,best_d,f_info=True,jam_d=0):
    ##    show('!Optimizing',root)
    global item_at_car
    opt_root=[]
    cur=current
    org_now=now
    org_effc=effc
    n=len(root)
    
    for i in range(1,n+1):
        next_dest,dist=root[-i]
        drop=[]
        alt=0
        n_item=0
        for nb,d_nb in g[jam_d][cur]:
            if nb==next_dest:continue
            if len(item_at_car[nb])>n_item:
                #n_item=len(item_at_car[nb])
                rt=now+d_nb
                for j in item_at_car[nb]:
                    alt+=T**2-(rt-j)**2
                if prevs[0][nb][next_dest]==nb: # nb connected to next_dest ( possible enhancement mins[prevs[nb][next_dest]][next_dest]==mins[nb][next_dest] )
                    drop_time=mins[jam_d][cur][nb]+mins[jam_d][nb][next_dest]-dist
                    drop_effc=(best_p+alt)/(drop_time+best_d)
                    if drop_effc>=effc:
                        effc=drop_effc
                        drop.append((nb,mins[jam_d][cur][nb]))
                        drop.append((next_dest,mins[jam_d][nb][next_dest]))
                elif 0==1:
                    drop_time=mins[jam_d][cur][nb]*2
                    drop_effc=(best_p+alt)/(drop_time+best_d)
                    if drop_effc>=effc:
                        effc=drop_effc
                        drop.append((nb,mins[jam_d][cur][nb]))
                        drop.append((cur,mins[jam_d][nb][cur]))
                        drop.append((next_dest,mins[jam_d][cur][next_dest]))
        
        if drop:
            opt_root+=drop
            now+=drop_time
    ##            show('#yorimichi',drop)
        else:
            opt_root.append((next_dest,dist))
            now+=dist
        cur=next_dest
    
    # opt_root validation
    opt_valid=True
    cur=current
    for next_dest,dist in opt_root:
        if next_dest in neighber[cur]:
            if d_map[cur][next_dest]!=dist:
                opt_valid=False
            else:
                0 # validation ok
        else:
            opt_valid=False
        
        cur=next_dest
    
    if opt_valid:
        p,t=root_valuator(current,org_now,opt_root,f_info=False)
        opt_effc=p/t if t!=0 else 0
        if org_effc<=opt_effc:
            rt=opt_root[::-1]
        else:
            rt=root
    else:
    ##        show('!!optimization failed')
        rt=root
    
    return jam_root_converter(cur,rt)

def jam_root_converter(cur,root):
    if root:
        root.append((cur,0))
        no_jam_root=[]
        for i in range(len(root)-1):
            p,x=root[i]
            nx,x=root[i+1]
            no_jam_root.append((p,d_map[p][nx]))
    else:
        no_jam_root=[]
    return no_jam_root

def root_generator(cur,deliver_point,jam_d=0):# generate root
    root=[]
    p=deliver_point
    while p!=cur:
        prev_p=prevs[jam_d][cur][p]
        root.append((p,mins[jam_d][p][prev_p]))
        p=prev_p
    return jam_root_converter(cur,root)

def best_deliver(cur,now,item_at_car,f_info=True,optimize_mode=True,sim_mode=False,jam_d=0):
    global order_at_shop
    global num_item_at_car
    if sim_mode:
        item_at_car=[[i for i in order] for orders in sim_item_at_car]
    
    min_update(now,cur,jam_d=jam_d)
    
    effc=0
    best_p,best_d=0,inf
    deliver_point=1
    # direct go
    for dest in range(2,V+1):
        if dest==cur:continue
        d=mins[jam_d][cur][dest]
        rt=now+d
        alt=0
        for j in item_at_car[dest]:
            alt+=T**2-(rt-j)**2
        if alt/d>effc:
            effc,best_p,best_d=alt/d,alt,d
            deliver_point=dest
    # turn to shop and go
    if cur!=1:
        db=mins[jam_d][cur][1]
        min_update(now+db,1,jam_d=jam_d)
        nx_item_at_car=[[] for i in range(1+V)]
        for order_v,t in order_at_shop:
            nx_item_at_car[order_v].append(t)
        for i in range(2,1+V):
            for t in item_at_car[i]:
                nx_item_at_car[i].append(t)
        if f_info:
            for t in range(min(now+1,T-1),min(now+db+1,T)):
                v=order[t][1]
                if v!=0:
                    nx_item_at_car[v].append(t)
        for dest in range(2,V+1):
            if cur==1:break
            if dest==cur:continue
            dg=mins[jam_d][1][dest]
            rt=now+db+dg
            d=db+dg
            alt=0
            for j in nx_item_at_car[dest]:
                alt+=T**2-(rt-j)**2
            if alt/d>effc:
                effc,best_p,best_d=alt/d,alt,d
                deliver_point=1

    # optimize
    if deliver_point==1:
        0
    else:
        if optimize_mode:
            root=optimizer_drop(cur,now,root,effc,best_p,best_d,f_info=False,jam_d=jam_d)
    # opt end

    # generate root
    root=root_generator(cur,deliver_point,jam_d=jam_d)
 
    return deliver_point,root,effc

def rand_move(cur,now,jam_d=0):
    n=len(g[0][cur])
    x=random.randint(0,n-1)
    dest,dist,ei=g[0][cur][x]
    root=[(dest,dist)]
    return 0,root,0

# recieve info
def interactive(wait_num):
    global item_at_car
    stop_flag=False
    stat_init()
    state=0 # 0 on vertex, 1 on road
    final_dest=1
    dest=1
    cur=1
    point=0
    effc=0
    cur_jam=0
    wait_status=False
    current_action=-1
    root=[]
    dist=inf
    
    for t in range(T):
        car_status=input()
        jam_info=LI()
        cur_jam=sum([jam_info[i]<<i for i in range(4)])
        Ncan=I()
        for j in range(Ncan):
            can_id=I()
            v_can,t_can=order_detail[can_id]
            cancel_order(v_can,t_can)
            
        Nnew=I()
        v=0
        for j in range(Nnew):
            new_id,v=MI()
            order_at_shop.append((v,t))# stock (vertex, order_time)
            order[t]=(new_id,v)
            order_detail[new_id]=(v,t)

        Nput=I()
        for j in range(Nput):
            put_id=I()

        show('items',item_at_car,order_detail[:10])
        ##show('state',state,'cur',cur,'dest',dest,'dist',dist,'final_dest',final_dest,'root',root)

        if car_status=='BROKEN':
            current_action=move(-1)
            show('Stay due to broken at',cur)
        elif wait_status:
            current_action=move(-1)
            show('waiting at ',cur)
        else:
            if state==0 and cur==1 and num_item_at_car<wait_num:
                current_action=move(-1)
            elif state==0: # at vertex
                if cur==1:
                    ship()
                else:
                    point+=deliver(cur,t)
                    
                if final_dest==cur:
                    deliver_point,root,effc=best_deliver(cur,t,item_at_car,optimize_mode=False,f_info=False,jam_d=cur_jam)
                    #deliver_point,root,effc=rand_move(cur,t,jam_d=cur_jam)
                    ##show('bd',root,item_at_car,order_at_shop)
                    if root:
                        final_dest=root[0][0]
                    else:
                        deliver_point,root,effc=rand_move(cur,t,jam_d=cur_jam)
                        final_dest=root[0][0]
                        ##show('random',root)

                dest,dist=root.pop() # not to do in waiting or jam
                state=1
                current_action=move(dest)
            else:
                current_action=move(dest)

        vardict = input()
        
        if vardict == 'NG':
            #import everything_
            exit()
        elif vardict=='JAM':
            show('Jam in going to',current_action)
            current_action=-1
            wait_status=False
        elif vardict[0]=='W': # WAIT
            wait_time=int(vardict[5:])
            wait_status=True
        else:
            wait_status=False
        
        #移動判定
        if current_action!=-1:
            dist-=1
            state=1
            if dist==0:
                cur=dest
                state=0
            
        if state==0:
            if cur==1:
                ship()
            else:
                point+=deliver(cur,t)
        
        Nachive = int(input())
        for j in range(Nachive):
            achive_id=I()

    return point

point=interactive(wait_num=1)

Submission status: Runtime Error

Solution code:
x,y,z=input().split(" ")
if((x+y+z)>=22):
  print("bust")
else:
  print("win")

Submission status: Runtime Error

Solution code:
A1,A2,A3=map(int,input().split())
A=A1+A2+A3
if　A>=22:
  print("bust")
else
	print("win")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main(){
  cin>>a>>b>>c;
  if(a+b+c<22){
    cout<<"bust";
  }
  else{
    cout<<"win";
  }
  return 0;
}

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=a+b+c
if(c<22):
  print("win")
else:
  print("bust")

Submission status: Runtime Error

Solution code:
input_line = input()
v1,v2,v3 = input_line.split(' ')
if v1+v2+v3 >= 22:
  print('bust')
else:
  print('win')

Submission status: Runtime Error

Solution code:
a1 = int(input())
a2 = int(input())
a3 = int(input())
res = a1 + a2 + a3
if res >= 22:
    print("bust")
else:
    print("win")

Submission status: Runtime Error

Solution code:
a1 = input()
a2 = input()
a3 = input()
res = a1 + a2 + a3
if res >= 22:
    print("bust")
else:
    print("win")

Submission status: Runtime Error

Solution code:
A = list(map(int, input().split()))
    a1, a2, a3 = A
    if a1 + a2 + a3 >= 22:
        print('bust')
    else:
        print('win')

Submission status: Runtime Error

Solution code:
in = list(map(int, input().split()))
s = sum(in)
if s>21:
  print('burst')
else:
  print('win')

Submission status: Runtime Error

Solution code:
ans = A1 + A2 + A3

if ans <= 21:
  print('win')
elif ans >= 22:
  print('bust)

Submission status: Runtime Error

Solution code:
S = list(input())
ANS = 0
for i in range(len(S)//2):
    if S[i] != S[len(S)-i]:
        ANS += 1

print(ANS)

Submission status: Runtime Error

Solution code:
a, b, c = input().split()
if a + b + c >= 21:
  print("win")
else:
  print("bust")

Submission status: Runtime Error

Solution code:
a, b, c = ma@(int, input().split())
if a + b + c > 21:
  print("bust")
else:
  print("win")

Submission status: Runtime Error

Solution code:
A1 = int(input())

A2 = int(input())

A3 = int(input())


s = A1 + A2 + A3

if s >= 22:

    print('bust')

else:

    print('win')

Submission status: Runtime Error

Solution code:
#coding: utf-8

value = input()

list = value.split()

for i in range(len(lise)):
  list[i] = int(list[i])
  
sum = list[0] + list[1] + list[2]

if sum >= 22:
  print("bust")
else:
  print("win")

Submission status: Runtime Error

Solution code:
#include <variant>
#include <bits/stdc++.h>

using namespace std;
typedef long long i64;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<string> vs;
typedef unordered_set<int> si;
typedef pair<int, int> ii;

#define mp make_pair
#define all(n) (n).begin(), (n).end()

#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)

template <typename T>
void printV(vector<T> A) {
    if (A.empty()) cerr << "EMTPY\n";
    else { 
        cerr << "\n[";
        for (int i = 0; i < A.size() -1 ; ++i) {
            cerr << A[i] << ", ";
        }
        if (A.size()) cerr << A.back() << "]\n";
    }
}


template <typename T>
void printVV(vector<vector<T>> A) {
    cerr << "\n[";
    for (auto v : A) {
        printV<T>(v);
    }
    cerr << "]\n";
}

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
    cerr << name << ": " << arg1 << endl;
}

template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&& ...args) {
    const char* comma = strchr(names + 1, ',');
    cerr.write(names, comma - names) << ": " << arg1 << " |";
    __f(comma + 1, args...);
}

int main(int argc, char **argv) {
    int a, b, c;
    cin >> a >> b >> c;
    if (a + b + c >= 22) cout << "bust" << endl;
    else cout << "win" << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
ERGTHJKJKJREbv ffffffs bboiuyazxcvbnm,.,mnbvcvbnjmk,l.kjhgfxzxcbnbvcxzxcvbgvcx

Submission status: Runtime Error

Solution code:
A1 =int(input())
A2 =int(input())
A3 =int(input())

if A1+A2+A3 > 21:
    print("lose")
else:
    print("win")

Submission status: Runtime Error

Solution code:
A1=input()
A2=input()
A3=input()

if A1+A2+A3 >21:
    print("lose")
else:
    print("win")

Submission status: Runtime Error

Solution code:
n = int(input())
ip = []

for i in range(n):
  a = int(input())
  ip.append(a)
  for j in range(a):
    x,y = map(int,input().split())
    ip.append([x,y])

max = 0    
for i in range(n) :
  max += 2**i

ans = 0
for i in range(0,max+1) :
  s = [2 for _ in range(n)]
  bit = i
  count = 0
  index = 0
  check = 0
  for j in range(n) :
    if bit%2 == 1 :
      if s[j] == 0 :
        check = 1
      s[j] = 1
    else :
      if s[j] == 1 :
        check = 1
      s[j] = 0
    bit = bit//2
    for k in range(ip[index]) :
      if s[j] == 1 :
        if ip[index+1+k][1] == 1 :
          if s[ip[index+1+k][0]-1] == 0 :
            check = 1
          s[ip[index+1+k][0]-1] = 1
        elif ip[index+1+k][1] == 0 :
          if s[ip[index+1+k][0]-1] == 1 :
            check = 1
          s[ip[index+1+k][0]-1] = 0
    index += ip[index] + 1
  if ans < s.count(1) and check ==0 :
    ans = s.count(1)

print(ans)

Submission status: Runtime Error

Solution code:
if sum(map(int,input().split()))<22:
 print("win")
else print("bust")

Submission status: Runtime Error

Solution code:
if sum(map(int,input().split())<22:
 print("win")
else print("bust")

Submission status: Runtime Error

Solution code:
a,b,c=int(input().split)
if a+b+c>21:
    print("bust")
else print("win")

Submission status: Runtime Error

Solution code:
a,b,c=input().split
if a+b+c>21:
    print("bust")
else print("win")

Submission status: Runtime Error

Solution code:
a,b,c=input().split
if a+b+c>21:
    print(“bust”)
else print(“win”)

Submission status: Runtime Error

Solution code:
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]


length = int(fetch_one_line())
nums = fetch_int_input()

bit_nums = [bin(i)[2:] for i in nums]
max_length = max([len(i) for i in bit_nums])

bit_nums = [list(i.zfill(max_length)) for i in bit_nums]
bit_nums = list(zip(*bit_nums))
sum_ones = [lst.count("1") for lst in bit_nums]
sum_zeros = [length - o for o in sum_ones]
multiples = [i * (length - i) for i in zip(sum_ones)]

result = sum([pow(2, i) * m for i, m in enumerate(reversed(multifrom sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]


length = int(fetch_one_line())
nums = fetch_int_input()

bit_nums = [bin(i)[2:] for i in nums]
max_length = max([len(i) for i in bit_nums])

bit_nums = [list(i.zfill(max_length)) for i in bit_nums]
bit_nums = list(zip(*bit_nums))
sum_ones = [lst.count("1") for lst in bit_nums]
sum_zeros = [length - o for o in sum_ones]
multiples = [i * (length - i) for i in sum_ones]

result = sum([pow(2, i) * m for i, m in enumerate(reversed(multiples))])
print(result % (pow(10, 9) + 7))

ples))])
print(result % (pow(10, 9) + 7))

Submission status: Runtime Error

Solution code:
number = input().split()

for i in number:
 sum = sum + i
 
if(sum>21): 
 print("bust")
else:
 print("win")

Submission status: Runtime Error

Solution code:
sum = 0;
for i in range(3):
    x = input()
    num_x = int(x)
    sum += num_x
if sum >= 21:
    print("bust")
else:
    print("win")

Submission status: Runtime Error

Solution code:
lst = list(map(lst = list(map(int,input().split()))
if sum(lst)>=22:
    print("bust")
else:
    print("win")int,input().split()))

Submission status: Runtime Error

Solution code:
a,b,c = int(input().split())
if(a+b+c >= 22):
  print("bust")
else:
  print("win")

Submission status: Runtime Error

Solution code:
int a,b,c
if a+b+c >= 22:
  print bust
else:
  print win

Submission status: Runtime Error

Solution code:
if(a+b+c >=22):
    print bust
else:
    print win

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    a_list = list(map(int, input().split()))
    mod = 10 ** 9 + 7

    sum = 0

    for i in range(60):
        count_1 = 0
        for a in a_list:
            bin_a = format(a, "b").zfill(60)
            if bin_a[59-i] == "1":
                count_1 += 1

        sum += 2 ** i * count_1 * (N - count_1)

    print(sum % mod)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a1,a2,a3 = input().split()
if(a1+a2+a3<22):
 print("win")
else:
 print("bust")

Submission status: Runtime Error

Solution code:
a1 = input()
a2 = input()
a3 = input()
if(a1+a2+a3<22):
 print("win")
else:
 print("bust")

Submission status: Runtime Error

Solution code:
a1 = raw_input()
a2 = raw_input()
a3 = raw_input()
if(a1+a2+a3<22):
 print("win")
else:
 print("bust")

Submission status: Runtime Error

Solution code:
a1, a2, a3 = map(int, input().split(' '))
    if (a1 + a2 + a3) >=22:
        print("bust")
    else:
        print("win")

Submission status: Runtime Error

Solution code:
A1,A2,A3 = map(int,input().split())
if sum(A1,A2,A3)>21:
    print("bust")
else:
    print("win")

Submission status: Runtime Error

Solution code:
A1,A2,A3 = map(int,input().split())
if sum(A1,A2,A3)>21:
    print("bust")
else:
    ("win")

Submission status: Runtime Error

Solution code:
a,b,c = int(input()).split()
if a+b+c <= 21:
	print("win")
else:
	print("bust")

Submission status: Runtime Error

Solution code:
a,b,c =split(int(input()))
if a+b+c <= 21:
	print("win")
else:
	print("bust")

Submission status: Runtime Error

Solution code:
a=input().split()
if a[0]+a[1]+a[2]<=21:
  print('win')
elif a[0]+a[1]+a[2]>21:
  print('bust')

Submission status: Runtime Error

Solution code:
print("bust" if sum(map(int, input().strip().split()) >= 22 else "win")

Submission status: Runtime Error

Solution code:
s = input()
l_s = s.split(' ')

a = sum(l_s)

if a <= 21:
  print("win")
else:
  print("bust")

Submission status: Runtime Error

Solution code:
import sys
lines = sys.stdin.readlines()
n = int(lines[0])
arr = list(map(int, lines[1].split(' ')))

maxi = 62
mod = int(1e9) + 7
ones = [0 for _ in range(maxi)]
for num in arr:
    for idx, val in enumerate(range(maxi)):
        ones[idx] += (num >> idx ) & 1

ans = 0
for idx, val in enumerate(ones):
    ans += ((pow(2, idx) % mod) * (((n - val)%mod) * (val%mod))) % mod

    ans %= mod

print(ans)

Submission status: Runtime Error

Solution code:
import sys
lines = sys.stdin.readlines()
n = int(lines[0])
arr = list(map(int, lines[1].split(' ')))

maxi = 62
mod = int(1e9) + 7
ones = [0 for _ in range(maxi)]
for num in arr:
    x = bin(num)[2:]
    # print(x)
    for idx, val in enumerate(reversed(x)):
        ones[idx] += int(val)

ans = 0
for idx, val in enumerate(ones):
    ans += ((pow(2, idx) % mod) * (((n - val)%mod) * (val%mod))) % mod

    ans %= mod

print(ans)

Submission status: Runtime Error

Solution code:
x,y,z = map(int,input().split())
	if x+y+z >= 22:
		print('bust')
	else:
		print('win')

Submission status: Runtime Error

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

	if x+y+z >= 22:

		print('bust')

	else:

		print('win')

Submission status: Runtime Error

Solution code:
a,c,c,cafjdsiaof

Submission status: Runtime Error

Solution code:
values = input()
values = [int(x) for x in values]
 
sum = 0
 
for val in values:
  sum += val
  
if sum >= 22:
  print("bust")
else:
  print("win")

Submission status: Runtime Error

Solution code:
values = input()
values = [int(x) for x in values]

sum = 0

for val in values:
  sum += val
  
if val >= 22:
  print("bust")
else:
  print("win")

Submission status: Runtime Error

Solution code:
import sys

a, b, c = map(int, sys.stdin.readline())

if (a+b+c >=22):
  print("bust")
else:
  print("win")

Submission status: Runtime Error

Solution code:
A1, A2, A3 = input().split(' ')
if A1 + A2 + A3 >= 22:
    return 'bust'
else:
    return 'win'

Submission status: Runtime Error

Solution code:
h, w = map(int, input().split())
inf = float('INF')
A = []
B = []

for i in range(h):
    line = list(map(int, input().split()))
    A.append(line)

for i in range(h):
    line = list(map(int, input().split()))
    B.append(line)

D = [[0]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        D[i][j] = abs(A[i][j] - B[i][j])


def slide_down(y, x, possible: set):
    new = set()
    delta = D[y+1][x]
    for num in possible:
        if num + delta <=6400:
            new.add(num+delta)
        if abs(num-delta) <= 6400:
            new.add(abs(num-delta))
    return new


def slide_right(y, x, possible: set):
    new = set()
    delta = D[y][x+1]
    for num in possible:
        if num + delta <=6400:
            new.add(num+delta)
        if abs(num-delta) <=6400:
            new.add(abs(num-delta))
    return new


DP = [[set() for j in range(w)] for i in range(h)]
DP[0][0] = {D[0][0]}
for row in range(h):
    for col in range(w):
        possible = DP[row][col]
        if col < w-1:
            new = slide_right(row, col, possible)
            DP[row][col+1] |= new
        if row < h-1:
            new = slide_down(row, col, possible)
            DP[row+1][col] |= new

ans = min(DP[h-1][w-1])
print(ans)

Submission status: Runtime Error

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

if A + B + C >= 22:
  print("bust")
else:
  print("win")

Submission status: Runtime Error

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

if A + B + C >= 22:
  print("bust")
else:
  print("win")

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
S=a+b+c
if S>=22:
	print("bust"))
else:
	print("win")

Submission status: Runtime Error

Solution code:
if a+b+c>=22:
	print("bust"))
else:
	print("win")

Submission status: Runtime Error

Solution code:
int a,b,c;
if a+b+c>=22:
	print("bust"))
else:
	print("win")

Submission status: Runtime Error

Solution code:
H, W=map(int, input().split())
maxK=80*80+1
A=[list(map(int, input().split())) for _ in range(H)]
B=[list(map(int, input().split())) for _ in range(H)]
C=[[abs(A[i][j]-B[i][j]) for j in range(W)] for i in range(H)]
dp=[[[0 for _ in range(maxK+1)] for _ in range(W+1)] for _ in range(H+1)]
dp[1][1][C[0][0]]=1
for i in range(1, H+1):
    for j in range(1, W+1):
        for k in range(maxK):
            if dp[i-1][j][k]==1 or dp[i][j-1][k]==1:
                k_candidate1, k_candidate2=abs(k-C[i-1][j-1]), abs(k+C[i-1][j-1])
                if k_candidate1<maxK:
                    dp[i][j][k_candidate1]=1
                if k_candidate2<maxK:
                    dp[i][j][k_candidate2]=1
for k in range(maxK):
    if dp[H][W][k]==1:
        print(k)
        break

Submission status: Runtime Error

Solution code:
print("win") if sum(map(int,input())) < 22 else print("bust")

Submission status: Runtime Error

Solution code:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
a_max = max(a)
l = len(bin(a_max)) - 2
bits = np.zeros((l,2))
for num in a:
    for i, bit in enumerate(format(num, 'b').zfill(l)):
        if bit == '0':
            bits[i,0] += 1
        else:
            bits[i,1] += 1

sumation = 0
div = (10**9+7)
for i in range(l):
    sumation += (bits[i,0]) * (bits[i, 1]) * (2**(l-i-1) % div)
print(int(sumation % (10**9+7)))

Submission status: Runtime Error

Solution code:
a1 = 2
a2 = 3
a3 = 5

all = a1+ a2 + a3
if(all >= 22):
  print("bust")
else if(all <=21 ):
  print("win")

Submission status: Runtime Error

Solution code:
sum=0
i = 1
while i < 4:
  val = int(input(""))
  sum+=val
  i += 1

if sum>=22:
    print('bust') 
else:
    print('win')

Submission status: Runtime Error

Solution code:
W,E,R = map(int,input().split())
if W + E + R >= 22:
    ans("bust")
else :
    ans("win")
print(ans)

Submission status: Runtime Error

Solution code:
W,E,R = map(int,input().split())
if W + E + R >= 22:
    ans("bust")
else :
    ans("win")
print(ans)

Submission status: Runtime Error

Solution code:
li = list(map(int,input().split()))
if sum(li) <22:
  print('win')
  else:
    print('bust')