mirror of
https://github.com/corda/corda.git
synced 2025-01-04 04:04:27 +00:00
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);
|
|
}
|
|
}
|