zccneil/codelingua_dataset huggingface dataset:
assistant: l, r = [int(x) for x in input().split()]
curr = r
s = 0
while curr:
    s += 1
    curr //= 10
first = 10 ** s
second = first // 2
ans = - 1
for i in [l, r, first, second]:
    if i >= l and i <= r:
        curr = i
        rev = ''
        for k in str(curr):
            rev += str(9 - int(k))
        ans = max(ans, int(rev) * curr)
print(ans)


user: import java.util.Scanner;

public class codeforces_86_A {
    public static int power(Long a) {
        int res = 0;
        while (a > 0) {
            res++;
            a = a / 10;
        }
        return res;
    }

    public static long mult(Long a) {
        int pow = power(a);
        long max = 0;
        for (int j = 0; j < pow; ++j) {
            max = max * 10 + 9;
        }
        return a * (max - a);
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long l = in.nextLong();
        long r = in.nextLong();
        long res = 0;
        long[] maxxes = new long[10];
        long temp = 0;
        for (int i = 0; i < 10; ++i) {
            temp = temp * 10 + 9;
            maxxes[i] = temp / 2 * (temp - temp / 2);
        }
        res = Math.max(mult(l), res);
        res = Math.max(mult(r), res);
        temp = 0;
        for (int i = 0; i < 10; ++i) {
            temp = temp * 10 + 9;
            if (l <= temp / 2 && temp / 2 <= r) res = Math.max(maxxes[i], res);
        }
        System.out.println(res);
    }
}
assistant: record_of_movements = input()
x, y = 0, 0
d_movement = {'L': (0, - 1), 'R': (0, 1), 'U': (1, 0), 'D': (- 1, 0)}
d = {(x, y): ''}
bug = False
for move in record_of_movements:
    temp = (x, y)
    x += d_movement[move][0]
    y += d_movement[move][1]
    if (x, y) not in d:
        for step in d_movement:
            if (x + d_movement[step][0], y + d_movement[step][1]) != temp and (x + d_movement[step][0], y + d_movement[step][1]) in d:
                bug = True
                break
    else:
        bug = True
    if bug:
        break
    d[x, y] = ''
if bug:
    print('BUG')
else:
    print('OK')


user: import java.util.Scanner;

public class codeforces_8_B {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int i, j, x = 0, y = 0, k = 0, dx, dy;
        boolean flag = true;
        String s;
        char[] ch = new char[100];
        int[][] co = new int[2][101];
        s = scan.next();
        ch = s.toCharArray();
        co[0][k] = x;
        co[1][k] = y;
        ++k;
        for (i = 0; i < s.length(); ++i) {
            switch (ch[i]) {
                case 'L':
                    --x;
                    break;
                case 'R':
                    ++x;
                    break;
                case 'U':
                    ++y;
                    break;
                case 'D':
                    --y;
                    break;
            }
            co[0][k] = x;
            co[1][k] = y;
            ++k;
        }
        for (i = 0; i < k - 3; ++i) {
            for (j = i + 3; j < k; ++j) {
                dx = co[0][i] - co[0][j];
                dy = co[1][i] - co[1][j];
                if (dx < 0) dx *= (-1);
                if (dy < 0) dy *= (-1);
                if ((dx <= 1 && dy == 0) || (dy <= 1 && dx == 0)) {
                    flag = false;
                    break;
                }
            }
            if (!flag) break;
        }
        if (flag) System.out.println("OK");
        else System.out.println("BUG");
    }
}
assistant: n, m = map(int, input().split())
i = 1
while m >= i:
    m -= i
    i = (i % n) + 1
print(m)


user: import java.util.*;

public class codeforces_92_A {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int n = scn.nextInt();
        int k = scn.nextInt();
        int i = 1, req = 1;
        while (k - req >= 0) {
            if (k - req >= 0) {
                k = k - req;
            } else {
                break;
            }
            i++;
            if (i % n != 0) req = i % n;
            else req = n;
        }
        System.out.println(k);
    }
}
assistant: pya = int(input())
arre = []
while pya:
    pya -= 1
    arre.append(input().lower())
oString = input()
lowString = oString.lower()
letter1 = input()[0].lower()
letter2 = 'a' if letter1.lower() != 'a' else 'b'
valid = [0 for i in range(len(oString))]
setcito = set()
for x in arre:
    if lowString.find(x) >= 0:
        wat = 0
        while True:
            index = lowString.find(x, wat)
            if index < 0:
                break
            for i in range(index, index + len(x)):
                setcito.add(i)
            wat = index + 1
oString = list(oString)
for i in setcito:
    letter = letter1 if lowString[i] != letter1 else letter2
    oString[i] = letter if oString[i].islower() else letter.upper()
for x in oString:
    print(x, end="")
print()


user: import java.io.*;
import java.util.*;

public class codeforces_95_A extends PrintWriter {
    codeforces_95_A() {
        super(System.out, true);
    }

    Scanner sc = new Scanner(System.in);

    public static void main(String[] $) {
        codeforces_95_A o = new codeforces_95_A();
        o.main();
        o.flush();
    }

    int compare(char[] aa, int i, char[] bb, int j, int m) {
        while (m-- > 0) {
            char a = Character.toUpperCase(aa[i]);
            char b = Character.toUpperCase(bb[j]);
            if (a != b) return a - b;
            i++;
            j++;
        }
        return 0;
    }

    void main() {
        int n = sc.nextInt();
        char[][] ss = new char[n][];
        for (int i = 0; i < n; i++) ss[i] = sc.next().toCharArray();
        char[] cc = sc.next().toCharArray();
        int m = cc.length;
        char c = sc.next().charAt(0);
        char c_ = Character.toUpperCase(c);
        char a = c == 'a' ? 'b' : 'a';
        char a_ = Character.toUpperCase(a);
        boolean[] lucky = new boolean[m];
        for (int j = 0; j < m; j++)
            for (int i = 0; i < n; i++) {
                int l = ss[i].length;
                if (m - j >= l && compare(cc, j, ss[i], 0, l) == 0)
                    for (int h = 0; h < l; h++) lucky[j + h] = true;
            }
        for (int j = 0; j < m; j++)
            if (lucky[j]) {
                if (Character.toLowerCase(cc[j]) == c)
                    cc[j] = Character.isUpperCase(cc[j]) ? a_ : a;
                else cc[j] = Character.isUpperCase(cc[j]) ? c_ : c;
            }
        println(cc);
    }
}
assistant: l = []
limit = 10000000000


def gen(number, four, seven):
    if (number > limit):
        return
    if (number > 0 and four == seven):
        l.append(number)
    gen(number * 10 + 4, four + 1, seven)
    gen(number * 10 + 7, four, seven + 1)


def main():
    gen(0, 0, 0)
    l.sort()
    n = int(input())
    ans = 0
    for val in l:
        if (val >= n):
            ans = val
            break
    print(ans)


main()


user: import java.util.Scanner;

public class codeforces_96_B {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long number = in.nextLong();
        long ans = -1, value = 0;
        int mask = 2;
        while (value < number) {
            String s = Integer.toBinaryString(mask++).substring(1);
            int zeros = 0;
            for (char c : s.toCharArray()) if (c == '0') zeros++;
            if (zeros != s.length() - zeros) continue;
            s = s.replace('0', '4');
            s = s.replace('1', '7');
            value = Long.parseLong(s);
        }
        System.out.println(value);
    }
}
assistant: l = input()
l = l.split('.')
s = list(l[0])
p = list(l[1])
i = int(p[0])
if s[len(s) - 1] == '9':
    print("GOTO Vasilisa.")
elif s[len(s) - 1] != '9' and i < 5:
    s = "".join(s)
    print(s)
else:
    s = "".join(s)
    s = str(int(s) + 1)
    print(s)


user: import java.math.BigInteger;
import java.util.Scanner;

public class codeforces_99_A {
    public static void main(String[] args) {
        char[] str = new Scanner(System.in).nextLine().toCharArray();
        int dotIndex = 0;
        for (int i = 0; i < str.length; i++)
            if (str[i] == '.') {
                dotIndex = i;
                break;
            }
        if (str[dotIndex - 1] == '9') {
            System.out.println("GOTO Vasilisa.");
        } else if (Integer.parseInt(str[dotIndex + 1] + "") > 4) {
            String _str = "";
            for (int i = 0; i < dotIndex; i++) _str += str[i];
            System.out.println(new BigInteger(_str).add(new BigInteger("1")).toString());
        } else {
            for (int i = 0; i < dotIndex; i++) System.out.print(str[i]);
            System.out.println();
        }
    }
}