Wrong Answer
Code
#include <iostream>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
int t, b, h, hy;
cin >> t;
while(t--){
cin >> b;
h = 4 * (b / 3);
hy = 5 * (b / 3);
if(hy*hy == (h*h + b*b)){
cout << b + h + hy << endl;
}else{
cout << -1 << endl;
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1027 Right triangle
- Contest
- Brain booster #2
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-03-06 14:38:04
- Judged At
- 2024-11-11 03:41:50
- Judged By
- Score
- 5
- Total Time
- 1ms
- Peak Memory
- 532.0 KiB