- you should module 1337 every product
- you should bash execute every 10, 100, 100...

```
public class Solution {
public int superPow(int a, int[] b) {
if (a == 0) {
return 0;
}
int indexb = b.length - 1;
long base = a;
long res = 1;
for (int count = b.length - 1; count >= 0; count--) {
for (int i = 0; i < b[count]; i++) {
res *= base;
if (res == 1337) {
return 0;
}
res = res % 1337;
}
long tt = base;
for (int i = 0; i < 9; i++) {
base *= tt;
if (base == 1337) {
return 0;
}
base = base % 1337;
}
}
return (int)res;
}
}
```