- 2025庆元旦欢乐水题赛
1+1=?
- 2024-12-31 21:40:31 @
book #include <bits/stdc++.h> using namespace std; int main() { long long a,b,c,d; cin>>a>>b>>c; while(a>0) { if(a<b) { d=a; } a-=b; b+=c;
} cout<<d;
return 0;
}
courie
#include <bits/stdc++.h> using namespace std; int main() { long long n,l[12],k[12],o[12],w[12]; string a[12]; cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; }
for(int i=1;i<=n;i++)
{
k[i]+=(a[i][0]-'0');
l[i]+=(a[i][1]-'0');
}
for(int i=1;i<=n;i++)
{
for(int j=2;j<a[i].size();j++)
{
if(j%2==0)
{
k[i]+=(a[i][j]-'0');
}
else l[i]+=(a[i][j]-'0');
}
o[i]=k[i]%11;
w[i]=l[i]%11;
if(o[i]==w[i])
{
cout<<"Yes"<<endl;
}
else cout<<"No"<<endl;
}
return 0;
}
3 条评论
-
王轩逸 LV 3 @ 2025-2-6 16:55:55
解:设答案为x. x-1=1 x=1+1 x=2
-
2025-1-31 23:27:27@
1+1=1||1+1=3
-
2025-1-23 13:56:07@
2
- 1