1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-13 11:42:18 +00:00
ton/crypto/func/test/a7.fc

13 lines
152 B
Text
Raw Normal View History

2019-09-07 10:03:22 +00:00
int steps(int x) {
var n = 0;
while (x > 1) {
n += 1;
if (x & 1) {
x = 3 * x + 1;
} else {
x >>= 1;
}
}
return n;
}