标签:out system color void div string demo 数字 sys
1 package com.baidu.demo; 2 3 public class Demo01 { 4 public static void main(String[] args) { 5 for (int i = 0; i < 2015; i++) { 6 int b = i / 1000; 7 int c = (i - b * 1000) / 100; 8 int d = (i - b * 1000 - c * 100) / 10; 9 int e = (i - b * 1000 - c * 100 - d * 10); 10 if (2015 - i == b + c + d + e) { 11 System.out.println(i); 12 } 13 } 14 } 15 }
答案是1993和2011
标签:out system color void div string demo 数字 sys
原文地址:http://www.cnblogs.com/pangabc/p/6416750.html