Advertisement
Francesco-_-

problema 3

Nov 11th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. def func(pict,k):
  2. # @param pict: picture
  3. # @param k: int
  4. # @return: bool
  5. S= 0
  6. y = 0
  7. for y in rage(0,getWidth(pict)):
  8. for x in range(getWidth(pict)):
  9. R= getRed(getPixel(pict,x,y))
  10. S= S + R
  11. if S == k :
  12. return True
  13. else :
  14. y= y+1
  15. S= 0
  16. return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement