from tkinter import *
from tkinter import ttk
root = Tk()
root.title("IMO 2010 Problem 5")
mainframe = ttk.Frame(root)
mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
coins=[]
for i in range(6):
coins.append(IntVar())
coins[i].set(1)
buttons1 = []
buttons2 = []
states = [['disabled'],['!disabled']]
def operate(a,b):
print(a,b)
temp = coins[b].get()-1
coins[b].set(temp)
if temp == 0:
buttons1[b].state(['disabled'])
buttons2[b].state(['disabled'])
if a == 1:
temp = coins[b+1].get()+2