Problem:
11936 - The Lazy Lumberjacks
Please find the problem here.
Solution:
This is the simplest problem I ever had, just implement the given formulas! However, it does take me some time to write.
Code:
Solution:
This is the simplest problem I ever had, just implement the given formulas! However, it does take me some time to write.
Code:
#include <bits/stdc++.h>
using namespace std;
int main(){
int t;
int x,y,z;
cin>>t;
while(t--){
cin>>x>>y>>z;
if(x+y>z && y+z>x && z+x>y){
cout<<"OK"<<endl;
}
else if(x==y && y ==z && z==x)
cout<<"OK"<<endl;
else cout<<"Wrong!!"<<endl;
}
return 0;}
No comments:
Post a Comment