Ошибка про несоответствие типа передаваемого параметра: int cannot be converted to BigInteger
Задача о зернах на шахматном поле рекурсией. Код:
public class Main {
public static void main(String[] args) {
go(1, 1);
}
static void go(int i, BigInteger count) {
count *= 2;
if (i >= 64) return;
go(i + 1, count);
}
}
Компилятор жалуется на несоответствие типа передаваемого параметра:
int cannot be converted to BigInteger
go(1, 1);
bad operand types for binary operator '*'
count *= 2;
в чем дело?