repo.or.cz
/
vutg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
examples insertion.
[vutg.git]
/
src
/
overflow.py
blob
1e8c5ab7b69b6a6fab94dac0b8c0e9e7e34f96da
1
def
reference_function
(
tmp
):
2
aux
=
zip
(
tmp
[
'a'
],
tmp
[
'b'
])
3
def
overflow
(
t
=()):
#t == (a,b); sum(t) == a+b
4
ret
=
0
5
if
sum
(
t
) >
255
:
6
ret
=
1
;
7
return
ret
8
return
map
(
overflow
,
aux
)