1
0
mirror of https://github.com/danog/ton.git synced 2024-12-04 10:28:27 +01:00
ton/crypto/func/test/a7.fc
2019-09-07 14:33:36 +04:00

13 lines
152 B
Plaintext

int steps(int x) {
var n = 0;
while (x > 1) {
n += 1;
if (x & 1) {
x = 3 * x + 1;
} else {
x >>= 1;
}
}
return n;
}