• <input id="auww4"></input>
  • <input id="auww4"><acronym id="auww4"></acronym></input>
  • <input id="auww4"><u id="auww4"></u></input>
    <object id="auww4"><acronym id="auww4"></acronym></object>
    <menu id="auww4"></menu><input id="auww4"><u id="auww4"></u></input>
    <input id="auww4"><u id="auww4"></u></input>
  • F.A.Q
    Hand In Hand
    Online Acmers
    Forum | Discuss
    Statistical Charts
    Problem Archive
    Realtime Judge Status
    Authors Ranklist
     
         C/C++/Java Exams     
    ACM Steps
    Go to Job
    Contest LiveCast
    ICPC@China
    Best Coder beta
    VIP | STD Contests
    Virtual Contests
        DIY | Web-DIY beta
    Recent Contests
    Author ID 
    Password 
     Register new ID

    Re:終于AC了,沒想到這個題卡這么多次

    Posted by hitwh2200400201 at 2020-12-13 11:16:35 on Problem 2010
    (69)  


    #include<iostream>
    #include<cstdio>
    #include<cstring>
    using namespace std;
    int main(){
    int j,k,q,i,m,n;
    int flag[1000];
    while(scanf("%d%d",&m,&n)!=EOF&&m>=100&&n<=999){
        int p=0;
        memset(flag,0,sizeof(flag));
        if(m<=n){
    for(i=m;i<=n;i++){
    	j=i/100;
    	k=i%100/10;
    	q=i%10;
    	if(i==j*j*j+k*k*k+q*q*q){
            flag[p]=i;
             p++;
                }
            }
            if(p==0) cout<<"no";
            else for(int l=0;l<p;l++){
                    if(l==0) cout<<flag[0];
                    else  cout<<' '<<flag[l];
            }
                cout<<endl;
         }
      }
    	return 0;
    }
    ----------------------------------------------------------------------------------


    Post your reply here:

    Author ID
    Password
    Title
    Content  
     
    Hangzhou Dianzi University Online Judge 3.0
    Copyright © 2005-2021 HDU ACM Team. All Rights Reserved.
    Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
    Total 0.015600(s) query 5, Server time : 2021-01-21 09:11:21, Gzip enabled
    棋牌