Advertisement
Guest User

cheat.java

a guest
Apr 29th, 2022
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.00 KB | None | 0 0
  1. import java.util.*;
  2. import java.io.*;
  3. import java.math.*;
  4.  
  5. class Solution {
  6.  
  7.      public static void main(String args[]) throws IOException {
  8.         String code = "r=readline,l3=r(l2=r(l1=r(e=''))),d=[' _ | ||_|','     |  |',' _  _||_ ',' _  _| _|','   |_|  |',' _ |_  _|',' _ |_ |_|',' _   |  |',' _ |_||_|',' _ |_| _|'];for(i=0;i*3<l1.length;i++)e+=d.indexOf(l1.substr(i*3,3)+l2.substr(i*3,3)+l3.substr(i*3,3));print(e)";
  9.         FileOutputStream outputStream = new FileOutputStream("code.js");
  10.         byte[] strToBytes = code.getBytes();
  11.         outputStream.write(strToBytes);
  12.  
  13.         outputStream.close();
  14.  
  15.         ProcessBuilder pb = new ProcessBuilder(
  16.             "/opt/coderunner/nodejs/bin/node",
  17.             "-r",
  18.             "/codemachine/lib/javascript/internal/polyfill.js",
  19.                 "code.js");
  20.         pb.inheritIO();
  21.         try {
  22.             Process p = pb.start();
  23.             p.waitFor();
  24.         } catch (Exception e) {
  25.             e.printStackTrace();
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement