Search found 7 matches

by atul
Wed Jan 08, 2014 11:25 am
Forum: Volume 104 (10400-10499)
Topic: 10490 - Mr. Azad and his Son!!!!!
Replies: 20
Views: 14264

Re: 10490 - Mr. Azad and His Son!!!!!

Why WA?????????
Plz help me.
I have tested all cases but why WA.

#include <iostream>
#include <cmath>
#include <cstdio>
#define mx 100
using namespace std;

int main()
{

int n;
bool prime[mx];
for(int i = 2; i <= 40; i++){
if(prime == false )
for(int j = i*i; j <= 40; j += i){
prime[j ...
by atul
Wed Jan 08, 2014 2:04 am
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 84738

Re: UVA 10070

Thanks a lot
by atul
Tue Jan 07, 2014 5:45 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 84738

Re: UVA 10070

Why Wrong Ans Plz help

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
//freopen("in.txt", "r", stdin);
long long int t = 0;
string s;
while(cin >> s){
++t;
long long int l = s.size();
long long int a55 = 0, a15 = 0, a4 = 0, a100 = 0, a400 = 0;
for(long int i = 0; i ...
by atul
Fri Oct 05, 2012 12:25 pm
Forum: Volume 12 (1200-1299)
Topic: 1225 - Digit Counting
Replies: 17
Views: 8574

Re: please help me why i am getting WA for my code ?

Problem no 1225 ,,,
I am getting WA.. plz help

this is my code

#include <stdio.h>
#include <stdlib.h>

int main()
{
int a[20],i,j,n,m,b,g,s;
scanf("%d",&n);
for(s=1;s<=n;s++)
{
for(i=0;i<20;i++)
{
a =0;
}
scanf("%d",&m);
for(i=1;i<=m;i++)
{
g=i;
if(i<10)
{
a =a +1;
}
else ...
by atul
Sat Sep 29, 2012 11:48 am
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 65292

Re: please help me why i am getting WA for my code ?

Now it is AC..
I forgor to print newline... :D
by atul
Sat Sep 29, 2012 11:20 am
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 65292

Re: please help me why i am getting WA for my code ?

I got AC...
by atul
Thu Sep 27, 2012 4:27 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 65292

Re: please help me why i am getting WA for my code ?

Please help me ,,Getting wrong ans..problem no. 488 ..Triangle wave

here is my code

#include <iostream>

using namespace std;

int main()
{
int amp,fre,i,n,j,v,b;
cin>>n;
for(i=1;i<=n;i++)
{
cin>>amp>>fre;
for(j=1;j<=fre;j++)
{

for(int k=1;k<=amp;k++)
{

for(int l=1;l<=k;l++)
cout<<k ...

Go to advanced search