int multiply(int a, int b) { if (a == 0 || b == 0) return 0; return _exp[(_log[a] + _log[b]) % (size - 1)]; }