Here is my code... i tried to substitute '\0' in the array "str" with spaces but i still get WA. I saw some topics about 490 but i didn't found where i'm wrong... can you help me?
[c]
#include <stdio.h>
#include <string.h>
main()
{
char str[103][103]={'\0'};
int i=0,j,maxl=0,k,pos;
while( fgets ...
Search found 3 matches
- Sun Jun 20, 2004 1:38 pm
- Forum: Volume 4 (400-499)
- Topic: 490 - Rotating Sentences
- Replies: 212
- Views: 48802
- Thu Nov 20, 2003 2:53 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 320897
i solved it
I got accepted only changing variables type from float to double... it's strange, I think there are no numbers to compute that are above 10^38....
but with old version i had:
(input) 1 999999
(output) 1 999999 502
with the new one:
(input) 1 999999
(output) 1 999999 525
could anyone clarify ...
but with old version i had:
(input) 1 999999
(output) 1 999999 502
with the new one:
(input) 1 999999
(output) 1 999999 525
could anyone clarify ...
- Thu Nov 20, 2003 3:10 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 320897
trouble with problem #100
hello, here's my code. I got WA too
#include <stdio.h>
#include <math.h>
#include <iostream.h>
using namespace std;
int main(void)
{
float i,j,ii,jj,n,t,ripetizioni;
unsigned long int max=0,conta,mem[1000001],x;
char buf[81];
for (x=1;x<=1000000;x++) mem[x]=0;
mem[x]=1;
for (x=2;x<1000;x ...
#include <stdio.h>
#include <math.h>
#include <iostream.h>
using namespace std;
int main(void)
{
float i,j,ii,jj,n,t,ripetizioni;
unsigned long int max=0,conta,mem[1000001],x;
char buf[81];
for (x=1;x<=1000000;x++) mem[x]=0;
mem[x]=1;
for (x=2;x<1000;x ...