What is wrong with my code?
#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
bool prima[1000005];
int main()
{
memset(prima,true,sizeof(prima));
prima[0] = false;
prima[1] = false;
for (long i = 2; i < 1000000; i++)
if (prima[i])
{
long j = 2*i;
while (j ...
Search found 3 matches
- Sun Jan 13, 2013 3:00 pm
- Forum: Volume 5 (500-599)
- Topic: 543 - Goldbach's Conjecture
- Replies: 109
- Views: 41205
- Sun Jan 13, 2013 3:00 pm
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 64502
488 WA
what is wrong with my code?
#include <cstdio>
int main()
{
long n;
scanf("%ld",&n);
for (long i = 0; i < n; i++)
{
if (i != 0) printf("\n");
long a, f;
scanf("%ld%ld",&a,&f);
for (long j = 0; j < f; j++)
{
if (j != 0) printf("\n");
for (long k = 1; k <= a; k++)
{
for (long l = 0; l ...
#include <cstdio>
int main()
{
long n;
scanf("%ld",&n);
for (long i = 0; i < n; i++)
{
if (i != 0) printf("\n");
long a, f;
scanf("%ld%ld",&a,&f);
for (long j = 0; j < f; j++)
{
if (j != 0) printf("\n");
for (long k = 1; k <= a; k++)
{
for (long l = 0; l ...
- Fri Jan 11, 2013 1:09 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10082 - WERTYU
- Replies: 57
- Views: 16652
Re: 10082 - WERTYU
I got WA before, but after i put that qwertyu[' '] = ' ', i got AC... so my mistake is just forget that space is space