|  | 
|  | 
| back to board | WA#52 Posted by Babies  20 Apr 2013 22:56Hi, i have problem with WA#52, I used long long and test 1 1 32 => accept.This's my code :
 #include <iostream>
 using namespace System;
 using namespace std;
 long long func( long long x , int po );
 
 void main() {
 
 long long a,b,c,y,k,x,n,m;
 cin>>a>>b>>c;
 
 k = (c-1)/a;
 m = (c-1)/b;
 x = func( k ,2 );
 y = func( m , 2 );
 
 printf("%lld\n%lld\n2",x,y);
 system("pause");
 }
 
 long long func( long long x , int po ) {
 long long temp=2;
 for( int i=1; i<x; i++ ) {
 temp *= po;
 }
 return temp;
 }
Re: WA#52 Hi, I had WA 52 too, these tests helped me:1) 1 1 1
 2) 5 10 1
 
 Edited by author 16.10.2016 19:50
 | 
 | 
|