Skoči na vsebino

Dvojisko sporocilo - Starc Aljaz

ta najlepsa resitev
import java.util.*;

class DN04 {
    public static void main (String[] args) {
        for (int i = 0; i < args[0].length(); i += 8) System.out.print((char) Integer.parseInt(args[0].substring(i, i + 8), 2));
    }
}
import java.util.*;

class DN04 {
    public static void main (String[] args) {
        while (args[0].length() > 0) {
            System.out.print((char) Integer.parseInt(args[0].substring(0, 8), 2));
            args[0] = args[0].substring(8);
        }
    }
}
ta nrbol jank resitev
import java.util.*;

class DN04 {
    public static void main (String[] args) {
        String str = "";
        
        while (args[0].length() > 0) {
            str += (char) Integer.parseInt(args[0].substring(0, 8), 2);
            args[0] = args[0].substring(8);
        }
        System.out.println(str);
    }
}

Zadnja posodobitev: April 5, 2022