/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 412.0 KiB

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;
		}else{
			cout << -1;
        }
    }
	return 0;
}

Information

Submit By
Type
Pretest
Problem
P1027 Right triangle
Language
C++20 (G++ 13.2.0)
Submit At
2024-03-06 14:36:23
Judged At
2024-03-06 14:36:23
Judged By
Score
0
Total Time
1ms
Peak Memory
412.0 KiB