Code: Select all
Z:A
Code: Select all
Z:A
Code: Select all
10
1 2 5 4 6 3 8 9 10 7
7 10 9 8 3 6 4 5 2 1
0
3
1 3 2
2 3 1
0
6
4 6 5 3 2 1
5 4 3 1 2 6
6 5 4 2 3 1
0
0
Code: Select all
Yes
No
Yes
Yes
Yes
No
No
Code: Select all
5
1 0
1 1
2 2
3 3
12 18
Code: Select all
Between 1 and 1, 0 has a maximum of 2 divisors.
Between 1 and 1, 1 has a maximum of 1 divisors.
Between 2 and 2, 2 has a maximum of 2 divisors.
Between 3 and 3, 3 has a maximum of 2 divisors.
Between 12 and 18, 12 has a maximum of 6 divisors.
thnx..............alimalimbubt wrote:Don't print the new line after last output.....
Thank you so much...................lbv wrote:Did you read the second comment (the one about strlen)?shipu_a wrote: now TLE
You can try changing this:for something like this:Code: Select all
for(int i=0;i<strlen(s);i++)
Code: Select all
for(int i=0, len = strlen(s);i<len;i++)