fork download
  1. def ile_kolorowych(n, kolor):
  2. if kolor=="b":
  3. return n*n//2
  4. else:
  5. return (n*n-1)//2+1
  6. print(ile_kolorowych(8,"b"))
  7. print(ile_kolorowych(7,"b"))
  8. print(ile_kolorowych(8,"c"))
  9. print(ile_kolorowych(7,"c"))
  10.  
Success #stdin #stdout 0.11s 14168KB
stdin
Standard input is empty
stdout
32
24
32
25