diff --git a/FLOW007.java b/FLOW007.java new file mode 100644 index 0000000..1b0102d --- /dev/null +++ b/FLOW007.java @@ -0,0 +1,22 @@ +import java.util.Scanner; + +public class Main { + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + while(sc.hasNext()) { + int t = sc.nextInt(); + for(int i = 0; i < t; i++) { + int num = sc.nextInt(); + boolean zero = false; + String str = Integer.toString(num); + for(int j = str.length() - 1; j >= 0; j--) { + if(zero || str.charAt(j) != '0') { + System.out.print(str.charAt(j)); + if(str.charAt(j) > 0) + zero = true; + } + } + System.out.println(); + }} + } +} diff --git a/LUCKFOUR.java b/LUCKFOUR.java new file mode 100644 index 0000000..47be71d --- /dev/null +++ b/LUCKFOUR.java @@ -0,0 +1,32 @@ +/* package codechef; // don't place package name! */ + +import java.util.*; +import java.lang.*; +import java.io.*; + +/* Name of the class has to be "Main" only if the class is public. */ +class Codechef +{ + public static void main (String[] args) throws java.lang.Exception + { + // your code goes here + Scanner sc=new Scanner(System.in); + + int t=sc.nextInt(); + + for(int i=0;i0) + { + temp=n%10; + if(temp==4) + cou++; + n=n/10; + } + System.out.println(cou); + } + } +} diff --git a/TSORT.cpp b/TSORT.cpp new file mode 100644 index 0000000..caab331 --- /dev/null +++ b/TSORT.cpp @@ -0,0 +1,23 @@ +#include + +int main() +{ + int a[1000006] ,b[1000006], j, i, t; + scanf("%d",&t); + + for(i = 1; i <= t; i++) { + scanf("%d",&b[i]); + } + + for(i = 1; i <= t; i++) { + a[b[i]]++; + } + + for(j = 1; j < 1000006; j++) { + while(a[j]--) { + printf("%d\n", j); + } + } + + return 0; +}