14 条题解

  • 1
    @ 2024-3-17 7:47:48
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        cout<<"153 370 371 407";
        return 0;
    }
    
    • @ 2024-4-7 20:07:02

      你牛呀!!!直接“cout”这些数!!!

  • 0
    @ 2024-8-7 10:38:31
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int a,b,c,i;
    	for(i=10;i<1000;i++){
    		a=i%10;
    		b=i/10%10;
    		c=i/100;
    		if(pow(a,3)+pow(b,3)+pow(c,3)==i)
    		cout<<i<<" ";
    	}		
    	return 0;
    }
    • 0
      @ 2024-7-17 10:57:39
      
      ```#include <iostream>
      #include <cmath>
      using namespace std;
      int main(){
          for(int num=100;num<1000;++num) {
              int sum=0;
              int temp=num;
              while(temp>0){
                  int digit=temp%10;
                  sum+=pow(digit,3);
                  temp/=10;
              }
              if(sum == num){
                  cout<<num<<" ";
              }
          }
          return 0;
      }
      • 0
        @ 2024-7-17 10:46:22

        #include #include

        using namespace std;

        int main() {

        for (int num = 100; num < 1000; ++num) {
            int sum = 0;
            int temp = num;
            while (temp > 0) {
                int digit = temp % 10;
                sum += pow(digit, 3);
                temp /= 10;
            }
            if (sum == num) {
                cout << num <<" ";
            
            }
        }
        
        return 0;
        

        }

        • 0
          @ 2024-7-16 15:01:07

          #include<bits/stdc++.h> using namespace std; int main(){ for(int a=0;a<=9;a++){ for(int b=0;b<=9;b++){ for(int c=0;c<=9;c++){ if(aaa+bbb+ccc==100a+10b+c && 100<100a+10b+c&&100a+10b+c<1000) cout<<100a+10b+c<<" "; } } } }

          • 0
            @ 2024-4-19 16:36:21

            #include<bits/stdc++.h> using namespace std; int main(){ int n,x; for(int y=100;y<=999;y++){ if((y%10)(y%10)(y%10)+(y/10%10)(y/10%10)(y/10%10)+(y/100%10)(y/100%10)(y/100%10)==y){ cout<<y<<" "; } } return 0; }

            • 0
              @ 2024-4-7 20:58:37
              #include <iostream>
              #include <cmath>
              using namespace std;
              int main(){
                  for(int num=100;num<1000;++num) {
                      int sum=0;
                      int temp=num;
                      while(temp>0){
                          int digit=temp%10;
                          sum+=pow(digit,3);
                          temp/=10;
                      }
                      if(sum == num){
                          cout<<num<<" ";
                      }
                  }
                  return 0;
              }
              
              • 0
                @ 2024-3-31 10:26:42

                #include #include

                using namespace std;

                int main() {

                for (int num = 100; num < 1000; ++num) {
                    int sum = 0;
                    int temp = num;
                    while (temp > 0) {
                        int digit = temp % 10;
                        sum += pow(digit, 3);
                        temp /= 10;
                    }
                    if (sum == num) {
                        cout << num <<" ";
                    
                    }
                }
                
                return 0;
                

                }

                • 0
                  @ 2024-3-17 14:46:34
                  #include <iostream>
                  #include <cmath>
                  
                  using namespace std;
                  
                  int main() {
                      
                      for (int num = 100; num < 1000; ++num) {
                          int sum = 0;
                          int temp = num;
                          while (temp > 0) {
                              int digit = temp % 10;
                              sum += pow(digit, 3);
                              temp /= 10;
                          }
                          if (sum == num) {
                              cout << num <<" ";
                          
                          }
                      }
                  
                      return 0;
                  }
                  
                  • 0
                    @ 2024-3-14 21:49:51
                    #include <iostream>
                    #include <cmath>
                    
                    using namespace std;
                    
                    int main() {
                        
                        for (int num = 100; num < 1000; ++num) {
                            int sum = 0;
                            int temp = num;
                            while (temp > 0) {
                                int digit = temp % 10;
                                sum += pow(digit, 3);
                                temp /= 10;
                            }
                            if (sum == num) {
                                cout << num <<" ";
                            
                            }
                        }
                    
                        return 0;
                    }
                    
                    • 0
                      @ 2024-3-11 20:16:28
                      #include<bits/stdc++.h>
                      using namespace std;
                      int main(){
                          cout<<"153 370 371 407";
                          return 0;
                      }
                      
                      • -1
                        @ 2024-7-17 10:54:07

                        #include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,i; for(i=100;i<=999;i++){ a=i%10; b=i/10%10; c=i/100; if(pow(a,3)+pow(b,3)+pow(c,3)==i){ cout<<i<<" "; } } return 0; }``

                        • -1
                          @ 2024-3-31 15:48:53
                          #include <iostream>
                          #include <cmath>
                          
                          using namespace std;
                          
                          int main() {
                              
                              for (int num = 100; num < 1000; ++num) {
                                  int sum = 0;
                                  int temp = num;
                                  while (temp > 0) {
                                      int digit = temp % 10;
                                      sum += pow(digit, 3);
                                      temp /= 10;
                                  }
                                  if (sum == num) {
                                      cout << num <<" ";
                                  
                                  }
                              }
                          
                              return 0;
                          }
                          
                          • -4
                            @ 2024-2-15 10:29:57
                            #include<bits/stdc++.h>
                            #define int long long
                            #define endl '\n' 
                            using namespace std;
                            int a[10000];
                            string s1,s2,s3,s4;
                            signed main(){
                            	cout<<"153 370 371 407";	
                            	return 0;
                            }
                            
                            • 1

                            信息

                            ID
                            887
                            时间
                            1000ms
                            内存
                            64MiB
                            难度
                            2
                            标签
                            递交数
                            350
                            已通过
                            208
                            上传者