library Shift10 { static const int i1 = 10; static const int i2 = 100; static const int i3 = 1000; static const int i4 = 10000; static const int i5 = 100000; static const int[10] arr0 = [1, 10, 100, 1000, 10000, 100000, 100000 * 10, 100000 * 100, 100000 * 1000, 100000 * 10000]; static const int i1_1 = 100000 * 100000; static const int i2_1 = 10000000000 * 10000000000; static const int i3_1 = 100000000000000000000 * 10000000000; static const int i4_1 = 100000000000000000000 * 100000000000000000000; static const int i5_1 = 10000000000000000000000000000000000000000 * 10000000000; static const int[10] arr1 = [1, 10000000000, 100000000000000000000, 1000000000000000000000000000000, 10000000000000000000000000000000000000000, 100000000000000000000000000000000000000000000000000, 100000000000000000000000000000000000000000000000000 * 10000000000, 100000000000000000000000000000000000000000000000000 * 100000000000000000000, 100000000000000000000000000000000000000000000000000 * 1000000000000000000000000000000, 100000000000000000000000000000000000000000000000000 * 10000000000000000000000000000000000000000]; static const int i1_2 = 100000000000000000000000000000000000000000000000000 * 100000000000000000000000000000000000000000000000000; static const int i2_2 = 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000; static const int i3_2 = 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000; static const int i4_2 = 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000; static const int i5_2 = 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000; static const int[10] arr2 = [1, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 * 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000]; static function pow(int n) : int { require(n >= 0 && n <= 999); return (Shift10.arr0[(n % 10)] * Shift10.arr1[((n / 10) % 10)] * Shift10.arr2[((n / 100) % 10)]); } static function left(int x, int n) : int { return x * Shift10.pow(n); } static function right(int x, int n) : int { return x / Shift10.pow(n); } }