This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ziggy192; | |
import java.util.Scanner; | |
public class Cau3 { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
int time = 0; | |
int guess = 500; | |
int floor = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ziggy192; | |
import java.util.Scanner; | |
public class Cau4 { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
double currentAvg = 0; | |
int currTotalNumber = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Cau6 { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
System.out.print("n="); | |
int n = scanner.nextInt(); | |
scanner.nextLine(); | |
System.out.println("Enter matrix:"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Cau2 { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
int n = scanner.nextInt(); | |
scanner.nextLine(); | |
int[][] a = new int[n][n]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Cau1 { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
int input = scanner.nextInt(); | |
System.out.println(checkPerfectNumber(input )); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Task2 { | |
public static Scanner scan = new Scanner(System.in); | |
public static void main(String[] args) { | |
System.out.print("n="); | |
long n = scan.nextLong(); | |
System.out.println((n * 65579 + 94213) % 2018 + 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Task3 { | |
public static final int module = 1000000007; | |
public static Scanner scan = new Scanner(System.in); | |
public static void main(String[] args) { | |
System.out.print("k="); | |
int n = scan.nextInt(); | |
int nonDecreasingCnt = countNonDecreasing(n); | |
int equalNumberCnt = countEqualNumbers(n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.io.UnsupportedEncodingException; | |
import java.math.BigInteger; | |
import java.security.GeneralSecurityException; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import java.text.DateFormat; |