mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
9bb3d6b972
git-subtree-dir: sgx-jvm/avian git-subtree-mainline:f978eab8d1
git-subtree-split:09e4fe60d0
12 lines
226 B
Java
12 lines
226 B
Java
public class Simple {
|
|
public static int size(long v, int radix) {
|
|
int size = 0;
|
|
for (long n = v; n != 0; n /= radix) ++size;
|
|
return size;
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
size(42, 10);
|
|
}
|
|
}
|