Search found 7 matches

by masum93
Mon Apr 30, 2012 9:13 pm
Forum: Volume 4 (400-499)
Topic: 443 - Humble Numbers
Replies: 82
Views: 7165

Re: 443 Wrong Answer

Firstly I have some suggestions. Use the code [code] [/code] tag above to post codes. Otherwise it is really hard to understand codes. Use some spaces and indentetion in appropriate places, so that the code remains readable. If you alone understand your code, it is not going to help you a lot, right...
by masum93
Wed Apr 25, 2012 1:51 am
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 13141

Re: 10066 - The Twin Towers

We are asked to print an extra new line after each data set.
by masum93
Wed Apr 25, 2012 1:08 am
Forum: Volume 104 (10400-10499)
Topic: 10433 - Automorphic Numbers
Replies: 41
Views: 23280

Re: 10433 - Automorphic Numbers

import java.math.*; import java.util.*; public class Main { public static void main(String[] args){ Scanner big = new Scanner(System.in); BigInteger zero = new BigInteger("0"); while(true){ try{ String str = big.nextLine(); int len = str.length(); BigInteger n = new BigInteger(str); int y = n.intVa...
by masum93
Sun Nov 13, 2011 2:47 pm
Forum: Volume 116 (11600-11699)
Topic: 11621 - Small Factors
Replies: 3
Views: 3015

Re: 11621-Small factors

But your input consists of numbers greater than 2147483648 :)
And a stupid fact, the problem states that the numbers will be of the form 2^i3^j where i,j are in N i.e. they are positive integers, so the first number should be 6 because N is the set of positive integers, but this gives WA.
by masum93
Thu Oct 13, 2011 11:15 am
Forum: Volume 104 (10400-10499)
Topic: 10432 - Polygon Inside A Circle
Replies: 62
Views: 20281

Re: problem with 10432

Uva is not accepting the following code. It's saying the program is running beyond the time limit ! Can anyone help me out plz.. a = n*r*r* sin( 2*pi*pi/(n*180) )/2; Your angle finding formula is not correct. A regular convex n-gon has a total of (n-2)*180 degrees, and convert it into radian using ...
by masum93
Sat May 14, 2011 12:06 pm
Forum: Volume 102 (10200-10299)
Topic: 10213 - How Many Pieces of Land ?
Replies: 54
Views: 22726

100213

I have got WA in this code. But the output is not different I think.

Code: Select all

#include <stdio.h>
#include <math.h>
int main()
{
   int t,i;
   long long n,m;
   scanf("%d",&t);
   for (i = 0; i < t; i++)
   {   
      scanf("%lld",&n);
      m=(n*(n-1)*(n*n-5*n+18)/24)+1;
      printf("%lld\n",m);
   }
by masum93
Wed May 11, 2011 12:10 pm
Forum: Volume 102 (10200-10299)
Topic: 10213 - How Many Pieces of Land ?
Replies: 54
Views: 22726

Re: 10213 - How many pieces of land?

Here is my code. But I don't understand why I am getting WA. I have matched many test cases, but the outputs were same. #include <stdio.h> #include <math.h> int main() { int t,i; long long n,m; scanf("%d",&t); for (i = 0; i < t; i++) { scanf("%lld",&n); m=(n*(n-1)*(n*n-5*n+18)/24)+1; printf("%lld\n"...

Go to advanced search