17
1
using System;
2
using System.Linq;
3
4
public class Program {
5
public static void Main() {
6
int ppp = 111;
7
for (int ef = 10; ef < 100; ef++) {
8
int gh = ppp - ef;
9
for (int cd = 10; cd < 100; cd++) {
10
int ab = ef + cd;
11
if (new int[]{ef, gh, ab, cd}.SelectMany(o => new int[]{ o / 10, o % 10}).Distinct().Where(o => o != 1).Count() == 8 && ab > 9 && ab < 100) {
12
Console.WriteLine(string.Format("{0} - {1} = {2} + {3} = 111", ab, cd, ef, gh));
13
}
14
}
15
}
16
}
17
}
Cached Result
股票代號: 2330、股票名稱: 大立光、股票價值: 31400
股票代號: 2330、股票名稱: 大立光、股票價值: 31400
股票代號: 3008、股票名稱: 台積電、股票價值: 305000
股票代號: 0050、股票名稱: 元大台灣50、股票價值: 417750.00
股票代號: 2330、股票名稱: 大立光、股票價值: 31400
股票代號: 3008、股票名稱: 台積電、股票價值: 305000
股票代號: 0050、股票名稱: 元大台灣50、股票價值: 417750.00