All about problems in Volume CXXI. If there is a thread about your problem, please use it. If not, create one with its number in the subject.
Moderator: Board moderators
by uvasarker » Sun Jun 24, 2012 9:24 pm
In this problem I think the description of problem output and sample output are not same.
I am getting W A in this problem........where is the wrong? Anyone ..please..
- Code: Select all
#include <cstdio>
#include <iostream>
using namespace std;
int main()
{
int cas=0;
long n,m;
while(cin>>n>>m)
{
if(n==0 && m==0) break;
if(n==m)
cout<<"Case "<<++cas<<": :-|\n";
else if(n>m)
cout<<"Case "<<++cas<<": :-(\n";
else if(n<m)
cout<<"Case "<<++cas<<": :-)\n";
else printf("Case %ld: :-\\\n",++cas);
}
return 0;
}
-
uvasarker
- Learning poster
-
- Posts: 96
- Joined: Tue Jul 19, 2011 12:19 pm
- Location: Dhaka, Bangladesh
by brianfry713 » Tue Jun 26, 2012 12:39 am
Doesn't match sample input #2. min(3/2,1) is the same as min(2/1,1)
-
brianfry713
- Guru
-
- Posts: 1755
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Return to Volume CXXI
Who is online
Users browsing this forum: No registered users and 1 guest