Search found 13 matches

by RedCode119
Fri Sep 26, 2014 9:49 am
Forum: Volume 123 (12300-12399)
Topic: 12342 - Tax Calculator
Replies: 33
Views: 21764

Re: 12342 - Tax Calculator

To brainfry,
can't understand, what should i use instead of floating point ?? how can obey this condition "If the calculated tax is a floating point then it must be replaced by the smallest integer greater than the payable tax." without using floating point
by RedCode119
Thu Sep 25, 2014 6:22 pm
Forum: Volume 123 (12300-12399)
Topic: 12342 - Tax Calculator
Replies: 33
Views: 21764

Re: 12342 - Tax Calculator

can't understand y "46 no line ===> if(tax-result > 1e-6 ) result++; " is not working , here's my code
#include <iostream>
#include <math.h>

using namespace std;

int main()
{
long long n,t,cnt;
double tax;
int result;
cin>>t;
cnt=1;
while(t--)
{

cin>>n;
if(n<=180000)
cout<<"Case ...
by RedCode119
Fri Sep 19, 2014 7:51 pm
Forum: Volume 117 (11700-11799)
Topic: 11734 - Big Number of Teams will Solve This
Replies: 26
Views: 12395

Re: 11734 - Big Number of Teams will Solve This

can't understand why " cin>>n " doesn't work. if i input the value of n and hit enter button, it takes the value of t(string) too. " getline(t); " and "cin>>n; " works togather, i cannot hit enter key between them. but i works after 2nd case . here's the code , pls help.......
#include <iostream ...
by RedCode119
Wed Sep 17, 2014 11:46 pm
Forum: Volume 120 (12000-12099)
Topic: 12032 - The Monkey and the Oiled Bamboo
Replies: 23
Views: 12780

Re: 12032 - The Monkey and the Oiled Bamboo

Thnx a lot Brainfry, Accepted
by RedCode119
Wed Sep 17, 2014 6:49 pm
Forum: Volume 120 (12000-12099)
Topic: 12032 - The Monkey and the Oiled Bamboo
Replies: 23
Views: 12780

Re: 12032 - The Monkey and the Oiled Bamboo

I check all the test cases, but can't find out why getting WS , Here's the code
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
long long t,n,h[100005],i,m,check,cnt,k;
cnt=1;
cin>>t;
while(t)
{
cin>>n;
for(i=0; i<n; i++)
{
cin>>h[i];
}
m=0;
for(i=0; i<n-1 ...
by RedCode119
Fri Aug 22, 2014 12:01 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153477

Re: 10038 - Jolly Jumpers

Thank u so much brainfry, i got it, it's a great mistake :P
by RedCode119
Thu Aug 21, 2014 10:56 pm
Forum: Volume 118 (11800-11899)
Topic: 11830 - Contract Revision
Replies: 20
Views: 7397

Re: Contract revision_11830

I'm getting WS but can't find out my problem. here's the code ..
#include <iostream>

using namespace std;

int main()
{
long long int a,b,i,add,sep,mul;
while(cin>>a>>b)
{
if(a==0 && b==0)
break;
mul=1;
add=0;
for(i=b;i!=0;i/=10)
{
sep=i%10;
if(sep!=a)
{
add=(sep*mul)+add;
mul*=10 ...
by RedCode119
Thu Aug 21, 2014 12:30 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153477

Re: 10038 - Jolly Jumpers

This code is also getting Wrong Answer . I try all the test cases and it's showing everything correctly but still getting Wrong Answer.....
#include <iostream>
#include<algorithm>
#include<stdlib.h>
using namespace std;
int main()
{
int n,c,b[3001],a[3001],i,k;
while(cin>>n)
{
c=1;
for(i=0; i ...
by RedCode119
Thu Aug 21, 2014 9:08 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153477

Re: 10038 - Jolly Jumpers WS

can't get why it's showing wrong answer.............
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;

int main()
{
int n,a,b,x,sub,old_sub,flag,calc;
while(cin>>n)
{
if(n==0)
continue;
flag=1;
if(n==1)
{
cout<<"Jolly"<<endl;
continue;
}
cin>>a>>b;
old ...
by RedCode119
Wed Aug 20, 2014 8:26 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153477

Re: 10038 - Jolly Jumpers

To lighted,
it's not working . srry 4 double post
by RedCode119
Wed Aug 20, 2014 7:00 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153477

Re: 10038 - Jolly Jumpers (Time limit exceeded)

Can't find out why it's showing time llimit exceeded. here's the code
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;

int main()
{
int n,a,b,x,sub,old_sub,flag;

while(cin>>n)
{
cin>>a>>b;
n=n-2;
old_sub=abs(a-b);
a=b;
flag=1;
while(n)
{
cin>>x;
sub ...
by RedCode119
Wed Aug 20, 2014 6:04 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153477

Re: 10038 - Jolly Jumpers

This code is showing time limit exceeded, can't find out why, pls help me
#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
int n,a,b,x,sub,old_sub,flag;

while(scanf("%d", &n)!=EOF)
{
cin>>a>>b;
n=n-2;
old_sub=a-b;
if(old_sub<0)
old_sub=old_sub*(-1);
a=b;
flag=1 ...
by RedCode119
Sun Aug 17, 2014 1:14 pm
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 45540

Re: 160 - Factors and Factorials

I can't find my problem will you help me :( here's my code
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
long n,i,j,k,m;
while(cin>>n, n!=0)
{
long fac[25]={0},prime[25]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97};
for(i=2; i<=n; i ...

Go to advanced search