36 lines
393 B
Plaintext
36 lines
393 B
Plaintext
u32 c(u32 n) {
|
|
u32 sum = 0u32;
|
|
while(n > 0u32) {
|
|
sum += n;
|
|
n -= 1u32;
|
|
}
|
|
return sum;
|
|
}
|
|
|
|
|
|
u64 fib(u64 i) {
|
|
u64 fibA = 0u64;
|
|
u64 fibB = 1u64;
|
|
|
|
while(--i > 0u64) {
|
|
u64 tmp = fibB;
|
|
fibB = fibA + fibB;
|
|
fibA = tmp;
|
|
}
|
|
|
|
return fibA;
|
|
}
|
|
|
|
(u64, u64) add(u64 a) {
|
|
u64 x = a++;
|
|
return x, a;
|
|
}
|
|
|
|
(u64, u64) tuple() {
|
|
return 1u64, 2u64;
|
|
}
|
|
|
|
u64 sub(u64 a) {
|
|
return --raw(u64, 0xFFu64);
|
|
}
|