This file contains hidden or 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.*; | |
| public class Aman_Birthday | |
| { | |
| static boolean found=false; | |
| public static String reverse(String ans) // reverses the string | |
| { | |
| String ans2=""; | |
| for (int i = ans.length()-1; i >=0 ; i--) { | |
| ans2=ans2+ans.charAt(i); |
This file contains hidden or 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.*; | |
| class Main | |
| { | |
| // Main Class | |
| static char[][] a=new char[8][8]; | |
| public static void Fill(int r,int c,int n) | |
| { | |
| if (n==0) | |
| return; |
This file contains hidden or 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.*; | |
| class Spacewars | |
| { | |
| public static void main(String[] args) | |
| { | |
| Scanner sc=new Scanner(System.in); | |
| int[][] game_area=new int[100][100]; | |
| for (int i=0;i<100;i++) | |
| { | |
| for (int j=0;j<100;j++) |
This file contains hidden or 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.*; | |
| public class Last_n { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| String s = sc.next(); | |
| int n = sc.nextInt(); | |
| int l=s.length(); | |
| String ans=s.substring(l-n,l); | |
| for (int i=0;i<n-1;i++) | |
| ans+=ans; |
This file contains hidden or 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.*; | |
| public class Newstring { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| String a = sc.next(); | |
| String b = sc.next(); | |
| String ans = ""; | |
| int l1 = a.length(), l2 = b.length(); | |
| int i = 0, a1 = 0, b1 = 0; | |
| while (a1 < l1 && b1 < l2) |
This file contains hidden or 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.*; | |
| public class RemoveStar | |
| { | |
| public static void main(String[] args) | |
| { | |
| Scanner sc=new Scanner(System.in); | |
| String s=sc.next(); | |
| int pos=0; | |
| for (int i=0;i<s.length();i++) | |
| { |
This file contains hidden or 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
| /* Alpha_The_Coder */ | |
| import java.util.*; | |
| public class EqualS { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int t = sc.nextInt(); | |
| while (t-- > 0) { | |
| int n = sc.nextInt(); | |
| String[] s = new String[n]; | |
| for (int i = 0; i < n; i++) // Input of strings |
This file contains hidden or 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.*; | |
| public class Changeten | |
| { | |
| public static void main(String[] args) | |
| { | |
| Scanner sc=new Scanner(System.in); | |
| int n; | |
| n=sc.nextInt(); | |
| long sum=0L; | |
| long[] a=new long[n]; |
This file contains hidden or 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.*; | |
| public class Changeten | |
| { | |
| public static void main(String[] args) | |
| { | |
| Scanner sc=new Scanner(System.in); | |
| int n; | |
| n=sc.nextInt(); | |
| int[] a=new int[n]; | |
| for (int i=0;i<n;i++) |
This file contains hidden or 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
| /* Alpha_The_Coder | |
| */ | |
| import java.util.*; | |
| public class Switch | |
| { | |
| static int rando() // Fucntion to find a random number between 0 to 9 | |
| { | |
| Random rand = new Random(); | |
| int upperbound = 10; | |
| int int_random = rand.nextInt(upperbound); |
NewerOlder