zoukankan      html  css  js  c++  java
  • narcissus

    public class narcissus
    {
    	public static void main(String args[])
    	{
    		long u=0,t=0,h=0,y=0,k=0;
    		for(long x=100; x<1000;x++)
    		{
    			u=x%10;
    			t=x/10%10;
    			h=x/100%10;
    			//k=x/1000%10;
    			//System.out.printf("%d
    ",x);
    			y=(u*u*u)+(t*t*t)+(h*h*h);
    			if(y==x) System.out.printf("%d
    ",y);
    		}
    	}
    }
    
    

  • 相关阅读:
    C语言I博客作业09
    C语言I博客作业08
    14
    13
    12
    11
    10
    9
    8
    7
  • 原文地址:https://www.cnblogs.com/WALLACE-S-BOOK/p/9732358.html
Copyright © 2011-2022 走看看