蓝桥杯大纲填空题通用样题“有趣的平方数”

Posted ZaleJ

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了蓝桥杯大纲填空题通用样题“有趣的平方数”相关的知识,希望对你有一定的参考价值。

a1.java

public class a1 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int i2=0;
        for(int i = 100; i < 1000; i++) {
            i2 = i*i;
            if(i2%1000==i) {
                System.out.print(i);
                return;
            }
        }
    }

}

 

以上是关于蓝桥杯大纲填空题通用样题“有趣的平方数”的主要内容,如果未能解决你的问题,请参考以下文章