Search
 
SCRIPT & CODE EXAMPLE
 

CPP

high school hacking competition

import java.util.Scanner;


public class SuperSecure {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    String input = in.next();
    if(input.length() != 10) {
      System.out.println("LOL no");
      System.exit(0);
    }
    String changed = change(input);
    if(changed.equals("fvbl}bf334")) {
      System.out.println("Awesome!");
      System.out.println("The flag is: " + input);
    } else {
      System.out.println("LOL no");
    }
   }
   private static String change(String s) {
    char[] temp = new char[10];
    for(int i = 0; i < s.length(); i++) {
      temp[i] = (char)(s.charAt(i) + 3);
    }
    return new String(temp);
  }
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: Extended Euclid Algorithm Recursive Solution 
Cpp :: 136. Single Number leetcode solution in c++ 
Cpp :: Implement a currency converter which ask the user to enter value in Pak Rupees and convert in following: in cpp 
Cpp :: c++ start thread later 
Cpp :: check if number is positive or negative in cpp 
Cpp :: ranged based for loop c++ 
Cpp :: c++ caps lock key 
Cpp :: rand() and srand() in C/C++ 
Cpp :: Use command line arguments to create file c++ 
Cpp :: C++ Display Numbers from 1 to 5 
Cpp :: multiple objects in vector C++ 
Cpp :: catalan numbers c++ 
Cpp :: std 
Cpp :: split the array there is an array val of n integers . A good subarray is defined as 
Cpp :: Jython Java Python 
Cpp :: c++ loop 
Cpp :: 2d vector size c++ 
Cpp :: unity decompile il2cpp 
Cpp :: wap in c++ to understand function template 
Cpp :: c++ programming 
Cpp :: check if an item is in a vector c++ 
Cpp :: c++ cin accept only numbers 
Cpp :: operator overloading 
Cpp :: c++ function parameters 
Cpp :: c++ variables 
Cpp :: what do we use c++ vectors for 
Cpp :: hello world program in c ++ using standard namespace 
Cpp :: dateformat in flutter 
C :: c get time in milliseconds 
C :: Which of the following are Cetaceans? 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =