improved performance
This commit is contained in:
parent
8c74e60f54
commit
4d6684d4b6
|
@ -1,3 +1,4 @@
|
||||||
from fabelous_math import is_even, is_odd
|
from fabelous_math import is_even, is_odd
|
||||||
|
|
||||||
print(is_even(5))
|
print(is_even(5))
|
||||||
|
print(is_odd(19))
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace simple_functions {
|
namespace simple_functions {
|
||||||
bool is_even(long long number) {
|
bool is_even(long long number) {
|
||||||
return (number & 1) == 0;
|
return (number & 1) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_odd(long long number) {
|
bool is_odd(long long number) {
|
||||||
return (number & 1) == 1;
|
return (number & 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue