ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1428. Jedi Riddle

WA#1
Posted by Rushboy 5 Jan 2013 16:02
why?

here is the code:

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

int main(){
    long long X,Y,Z,k,l,m;
    short A,B,C;
    cin>>A>>B>>C;
    k=(C-1)/A;
    l=(C-1)/B;
    X=1;Y=1;
    for(long i=1;i<=k;i++)
     X*=2;
    for(long i=1;i<=l;i++)
     Y*=2;
    cout<<X<<" "<<Y<<" "<<"2";
    return 0;
}