I faced problem during submitting OR Permutation problem in java . The same code which was giving TLE during contest is getting AC now.
I want my rating to be restored to last value.
//
class Codechef
{
public static void main (String args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int T=sc.nextInt();
sc.nextLine();
while(T–>0)
{
int n=sc.nextInt();
for(int i=n;i>=1;i–)
{
System.out.print(i+" ");
}
System.out.println();
}
}
}
//
A simple O(n) solution.
@rishin_13
Please write your concern to help@codechef.com. The team will address your query there.
1 Like