Ctrl+P again to print, arrows/tab to navigate results, enter to confirm

    Please in order to save solutions and appear on the leaderboards. New here? Check out the Tutorial hole.

    Details

    David is firing up the barbecue to sear a thick cut of A5 Wagyu. Because David treats steak as an exact science, he demands a mathematically perfect 45° crosshatch sear over a BMS 12 marbling pattern.

    Print the 19×9 ASCII representation of David's steak (x from 0 to 18 horizontally, y from 0 to 8 vertically) using the following priority rules for each coordinate (x, y):

    1. Corners: Print / at (0, 0) and (18, 8). Print \ at (18, 0) and (0, 8).
    2. Crust: Print # along the remaining outer border (x == 0, x == 18, y == 0, or y == 8).
    3. Grill Marks: Inside the border, let a = (x + y) % 4 == 0 and b = (x - y) % 4 == 0.
      • If both a and b are true, print X.
      • If only a is true, print /.
      • If only b is true, print \.
    4. Intramuscular Fat (A5 Marbling): Otherwise, if (x * y) % 3 == 0, print ..
    5. Prime Beef: For all remaining cells, print @.
    Copied
    0 bytes, 0 chars
    Restore solution
    Compiled from AT&T syntax to x86-64 Linux. Use syscalls to write output.
    ctrl + enter or

    Delete Solution

    Are you sure you want to delete your solution(s) for David's A5 Wagyu?

    If you have separate bytes and chars solutions then both will be deleted.

    This is irreversible, please backup any code you care about.

    Type I understand and press confirm to continue.