初级光能
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d;
cin>>d;
d>=100&&d<=999;
a=d/100;
b=(d-10)%10;
c=d%10;
if(a>b&&a>c)
{
if(b>c)
d=a*100+b*10+c;
}
if(a<b&&b>c)
{
if(a>c)
d=b*100+a*10+c;
}
if(c>b&&a<c)
{
if(a>b)
d=c*100+a*10+b;
}
if(a>b&&a>c)
{
if(b<c)
d=a*100+c*10+b;
}
if(a<b&&b>c)
{
if(a<c)
d=b*100+c*10+a;
}
if(c>b&&a<c)
{
if(a<b)
d=c*100+b*10+a;
}
cout<<d;
return 0;
}
请各位看看这代码有什么错?
感激不尽!!!
初级守护
#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}
初级守护
#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}
#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}#include<iostream>
#include<string>
using namespace std;
int c;
int main(){
string a;
cin>>a;
for(int i=0;i<=7;i++){
if(a[i]=='1'){
c++;
}
}
cout<<c;
return 0;
}
初级守护
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }
#include<iostream> using namespace std; int main(){ int g,s,b,k,a; while(cin>>a){ if(a==0) break; g=a%10; s=(a/10)%10; b=a/100; k=g*g*g+s*s*s+b*b*b; if(k==a) { cout<<"YES\n"; } else cout<<"NO\n"; } return 0; }