1-masala python.
a,b,c=sorted(list(map(int,input().split())))
if a!=0 and b!=0 and c!=0:
if a**2+b**2==c**2:
print('Yes')
else:
print('No')
else:
print("No")
1-masala cpp
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if ((a>0)and (b>0)and (c>0)){
if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a){
cout<<"Yes";
}
else
{
cout<<"No";
}
}
else
{
cout<<"No";
}
return 0;
}
2-masala python
son=int(input())
d=son*5
if d>925 and d<1850:
d-=925
elif d>1850 and d<2775:
d-=1850
elif d>2775 and d<3700:
d-=2775
elif d>2775 and d<4625:
d-=2775
elif d>4625:
d-=4625
if d<200 or (d>925 and d<1000):
print(d)
print('Qarshi')
elif d>=200 and d<500:
print(d)
print('Jizzax')
elif d>=500 and d<650:
print(d)
print('Toshkent')
elif d>=650 and d<770:
print(d)
print('Namangan')
elif d>=770 and d<815:
print(d)
print('Termiz')
elif d>=815 and d<925:
print(d)
print('Sirdaryo')
elif d==925:
print(d)
print('Xiva')
2-masala cpp.
#include <iostream>
int main() {
int l;
std::cin >> l;
int l2 = l % 185;
int km = 5 * l2;
if ((5 * l) % 925 != 0) {
std::cout << (5 * l) % 925 << std::endl;
} else {
std::cout << 5 * l << std::endl;
}
if (0 < km && km < 200) {
std::cout << "Qarshi" << std::endl;
} else if (200 <= km && km < 500) {
std::cout << "Jizzax" << std::endl;
} else if (500 <= km && km < 650) {
std::cout << "Toshkent" << std::endl;
} else if (650 <= km && km < 770) {
std::cout << "Namangan" << std::endl;
} else if (770 <= km && km < 815) {
std::cout << "Termiz" << std::endl;
} else if (815 <= km && km < 925) {
std::cout << "Sirdaryo" << std::endl;
} else {
std::cout << "Xiva" << std::endl;
}
return 0;
}