luyencode / comments

Server lưu trữ bình luận trên Luyện Code
https://luyencode.net
6 stars 3 forks source link

https://oj.luyencode.net/problem/PTIT031 #751

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Chi tiết bài tập - Luyện Code Online

https://luyencode.net/problem/PTIT031

sseu18042004 commented 1 year ago

có lẽ bài này testcase hơi lạ, các bạn có thể làm theo cách đơn giản là tính tổng diện tích của 3 hình chữ nhật nếu sqrt(s) là số nguyên thì chứng tỏ nó ghép đc thành hình vuông

otcutie

#include #define ll long long int #define ull unsigned long long int #define llb long double #define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define el cout<<"\n" #define mod 1000000007 using namespace std; int main() { fast int n=3; ull res=0; while(n--) { ull a,b; cin>>a>>b; res+=a*b; } llb x=sqrt(res); if (x*x== res) { cout<