[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4759: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
Dev Skill Forum • View topic - Number sort. getting wrong answer. what's wrong?

Number sort. getting wrong answer. what's wrong?

Dev Skill archived problems can be discussed here.

Number sort. getting wrong answer. what's wrong?

by Dinar » Mon Sep 26, 2016 7:37 pm

 
Posts: 8
Joined: Thu Sep 22, 2016 9:14 pm

Re: Number sort. getting wrong answer. what's wrong?

by devskill » Tue Sep 27, 2016 10:45 pm

User avatar
Site Admin
 
Posts: 118
Joined: Tue Feb 02, 2016 10:24 pm

Re: Number sort. getting wrong answer. what's wrong?

by Dinar » Wed Sep 28, 2016 7:47 pm

 
Posts: 8
Joined: Thu Sep 22, 2016 9:14 pm

Re: Number sort. getting wrong answer. what's wrong?

by devskill » Wed Sep 28, 2016 10:01 pm

Hi, your previous solution was correct. We found a small mistake in judge data. We have corrected and rejudged your solution and it got Accepted. We will rejudge all solution for this problem tonight.

For helping us in finding this problem, we will give you 50 DP.
User avatar
Site Admin
 
Posts: 118
Joined: Tue Feb 02, 2016 10:24 pm

Re: Number sort. getting wrong answer. what's wrong?

by Dinar » Wed Sep 28, 2016 10:45 pm

Thanks
 
Posts: 8
Joined: Thu Sep 22, 2016 9:14 pm

Number Formatting

by MarufAhmed » Mon Dec 19, 2016 12:25 pm

prb link : http://www.devskill.com/CodingProblems/ViewProblem/194

Why WA?

my code:

#include<stdio.h>
#include<string.h>
main()
{
int t,i,j,k;
scanf("%d",&t);
char ch[] = "abcd";
char p[10][5]={"011","015","016","017","018","019"};
char p1[10][17]={"Citycell","Teletalk","Airtel","Grameenphone","Robi","Banglalink"};
for(i=0;i<t;i++)
{
char s[15],c[15];
scanf("%s",s);

if(strlen(s)!=11)
{
for(j=2;j<13;j++)
{
c[j-2]=s[j];
}
}
else
{
for(j=0;j<11;j++)
{
c[j]=s[j];
}
}
for(j=0;j<6;j++)
{
if(strcmp(p[j],c)==1)
{
printf("88");
for(k=0;k<11;k++)
printf("%c",c[k]);
printf(" %s\n",p1[j-1]);
break;
}
}



}
}
 
Posts: 3
Joined: Sun Dec 18, 2016 11:21 pm


Who is online
Users browsing this forum: No registered users and 1 guest
cron