I am getting output limit exceeded . I have tried all these cases and my program runs fine. Plz help #include<stdio.h>
int main()
{
float a,b,i,j,k,l,m,n;
while(1)
{
scanf("%f%f",&a,&b);
if(a==1 && b==1)
break;
i=1;
j=1;
k=0;
l=1;
m=1;
n=0;
while(1)
{
if(a==i && b==j)
break;
if((a/b)<(i/j ...
Search found 3 matches
- Fri Dec 12, 2014 9:26 am
- Forum: Volume 100 (10000-10099)
- Topic: 10077 - The Stern-Brocot Number System
- Replies: 10
- Views: 9354
- Mon Dec 01, 2014 7:30 am
- Forum: Volume 113 (11300-11399)
- Topic: 11340 - Newspaper
- Replies: 154
- Views: 68875
Re: 11340 - Newspaper
Thanks lighted .
My code got accepted. But still not able to figure out what was wrong with scanf("%*c%[^\n]",b);
As i have used this on other question on spoj and have got accepted.
My code got accepted. But still not able to figure out what was wrong with scanf("%*c%[^\n]",b);
As i have used this on other question on spoj and have got accepted.
- Sun Nov 30, 2014 1:12 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11340 - Newspaper
- Replies: 154
- Views: 68875
Re: 11340 - Newspaper
Getting wrong answer . Please help me i used +127 so as to be sure
#include <iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
long long n,i,j,a[257],p,t,k,z,l;
double s;
char b[100000];
char ch;
scanf("%lld",&t);
while(t>0)
{
t--;
for(i=0;i<=256;i++)
a[i]=0;
scanf ...
#include <iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
long long n,i,j,a[257],p,t,k,z,l;
double s;
char b[100000];
char ch;
scanf("%lld",&t);
while(t>0)
{
t--;
for(i=0;i<=256;i++)
a[i]=0;
scanf ...