1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-13 19:52:18 +00:00
ton/crypto/func/auto-tests/tests/a7.fc
2022-09-23 16:27:18 +03:00

24 lines
354 B
Text

() main() { }
int steps(int x) method_id(1) {
var n = 0;
while (x > 1) {
n += 1;
if (x & 1) {
x = 3 * x + 1;
} else {
x >>= 1;
}
}
return n;
}
{-
method_id | in | out
TESTCASE | 1 | 1 | 0
TESTCASE | 1 | 2 | 1
TESTCASE | 1 | 5 | 5
TESTCASE | 1 | 19 | 20
TESTCASE | 1 | 27 | 111
TESTCASE | 1 | 100 | 25
-}