Untitled
Anonymous
Plain Text
10/04/2025 10:38 AM
1.7 KB
21
Indexable
Never
pal3 #4861
#include <iostream>
using namespace std;
int n,s,z,u;
int main()
{
cin >> n;
s=(n/100)%10;
u=n%10;
if (s==u) {
cout << "DA";
}
else {
cout << "NU";
}
return 0;
}
nrSumCifMax #3275
#include <iostream>
using namespace std;
int ab,cd,ef,z1,z2,z3,u1,u2,u3,S1,S2,S3;
int main()
{
cin >> ab >> cd >> ef;
z1=(ab/10)%10;
u1=ab%10;
S1=z1+u1;
z2=(cd/10)%10;
u2=cd%10;
S2=z2+u2;
z3=(ef/10)%10;
u3=ef%10;
S3=z3+u3;
if ((S1>=S3) && (S2>=S3)) {
cout << ab << " " << cd;
}
else if ((S1>=S2) && (S3>=S2)) {
cout << ab << " " << ef;
}
else {
cout << cd << " " << ef;
}
return 0;
}
U2Impare #252
#include <iostream>
using namespace std;
int n,x,y;
int main()
{
cin >> n;
if (n%2==0) {
x=n-1;
y=n-3;
}
else if (n%2!=0) {
x=n-2;
y=n-4;
}
cout << y << " " << x;
return 0;
}
U2Pare #253
#include <iostream>
using namespace std;
int n,x,y;
int main()
{
cin >> n;
if (n%2==0) {
x=n+2;
y=n+4;
}
else if (n%2!=0) {
x=n+1;
y=n+3;
}
cout << x << " " << y;
return 0;
}
triunghi #179
#include <iostream>
using namespace std;
int a,b,c;
int main()
{
cin >> a >> b >> c;
a>0;
b>0;
c>0;
if (a+b>c) {
cout << "da";
}
else if (a+c>b) {
cout << "da";
}
else if (b+c>a) {
cout << "da";
}
else {
cout << "nu";
}
return 0;
}
Editor is loading...
Leave a Comment