Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added solution of ABC 137 A problem #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions ABC137-A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include<stdio.h>
int main()
{
int a,b,sum,dif,mul;
scanf("%d %d",&a,&b);
sum=a+b;
dif=a-b;
mul=a*b;
if(sum>dif&&sum>mul)
printf("%d\n",sum);
else if(dif>sum&&dif>mul)
printf("%d\n",dif);
else
printf("%d\n",mul);
return 0;
}

2 changes: 1 addition & 1 deletion ABC140-A.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ int main() {
cin>>n;
cout<<pow(n,3);
return 0;
}
}