Đăng nhập để hỏi chi tiết


Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
\begin{array}{c} \color{#F5FAFF}{F} \color{#9EC1E9}{u} \color{#7DA6D9}{r} \color{#5C8BCD}{i} \color{#7A9CCF}{n} \color{#8BB0D9}{a} \color{#8BB0D9}{F} \color{#7A9CCF}{o} \color{#5C8BCD}{r} \color{#7DA6D9}{c} \color{#9EC1E9}{a} \color{#F5FAFF}{l} \color{#9EC1E9}{o} \color{#FFFFFF}{s} \end{array}
/**
* author: furina focalors
* from : A3K59 DHV
* created: 25.08.2025
**/
#include<bits/stdc++.h>
#define hutao long long
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
hutao n;
cin>>n;
vector<hutao> a(n+1);
for(hutao i=1;i<=n;i++)
{
cin>>a[i];
}
bool ok=false;
for(hutao i=1;i<=n;i++)
{
string s=to_string(a[i]);
if(s.find("10")!=string::npos)
{
cout<<a[i]<<" ";
ok=true;
}
}
if(!ok)
{
cout<<"-1";
}
}
Hãy giúp mọi người biết câu trả lời này thế nào?

#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n; cin >> n;
int a[100005];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
bool marks = false;
for (int i = 0; i < n; i++) {
string s = to_string(a[i]);
if (s.find("10") != string::npos) {
cout << a[i] << endl;
marks = true;
}
}
if (!marks) {
cout << -1;
}
return 0;
}
$\\$$\\$
Python
n = int(input())
a = list(map(int, input().split()))
marks = False
for i in range(n):
s = str(a[i])
if "10" in s:
print(a[i])
marks = True
if not marks:
print(-1)Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin
617
2415
382
Hi
1967
1140
1641
hmm-.-
1726
6451
2587
M bt học cách tịnh tâm ko=))🐧🐧🐧
1726
6451
2587
Mấy nay bị ăn chửi do Team Dan Tat nhiều mà t còn ko cãi 🐧🤡
149
3095
94
:)))))
1726
6451
2587
sang gđ 2 lật thôi =))
149
3095
94
chúc tdt lật thành công nhá:>
149
3095
94
nào lật dc quay lại:)