Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a=0
- b=0
- c=0
- display=''
- count=0
- pergunta=int(raw_input ("Insira um número inteiro"))
- for i in range(8):
- a=i
- for j in range(10):
- b=j
- for k in range(12):
- c=k
- result=i+j+k+3
- if result == pergunta:
- count+=1
- display += 'Rotações da Solução(' + str(count) + '): A(' + str(a) + ', B('+ str(b) + '), C('+ str(c) + ')\n'
- if display=='':
- print 'result is not obtainable'
- else:
- print str(count) + ' Soluções'+'\n'+str(display)
Advertisement
Add Comment
Please, Sign In to add comment