Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main{
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- String input = in.next();
- if(input.length() != 10) {
- System.out.println("you failed");
- System.exit(0);
- }
- String changed = change(input);
- if(changed.equals("fvcl{bf335")) {
- System.out.println("The flag is: " + input);
- } else {
- System.out.println("you failed");
- }
- }
- private static String change(String s) {
- String temp = “”;
- for(int i = 0; i < s.length(); i++) {
- temp+= (char)(s.charAt(i) + 3);
- }
- return temp;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement