赞
踩
添加代码如下:
- <dependencies>
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-library</artifactId>
- <version>2.12.15</version>
- </dependency>
-
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-compiler</artifactId>
- <version>2.12.15</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.spark</groupId>
- <artifactId>spark-core_2.12</artifactId>
- <version>3.0.0</version>
- </dependency>
-
-
- </dependencies>

同上设置下载Scala下载完成重启IDEA
- for (i <- 100 to 999) {
- val x = i / 100 // 获取百位数
- val y = (i / 10) % 10 // 获取十位数
- val z = i % 10 // 获取个位数
- if (i == x * x * x + y * y * y + z * z * z) {
- println(i)
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。