Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions FLOW007.java
Original file line number Diff line number Diff line change
@@ -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();
}}
}
}
32 changes: 32 additions & 0 deletions LUCKFOUR.java
Original file line number Diff line number Diff line change
@@ -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;i<t;i++)
{
int n=sc.nextInt();

int temp,cou=0;
while(n>0)
{
temp=n%10;
if(temp==4)
cou++;
n=n/10;
}
System.out.println(cou);
}
}
}
23 changes: 23 additions & 0 deletions TSORT.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include<stdio.h>

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;
}