This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** try to use Tuple */ | |
object Euler0009 { | |
private val max = 1000 | |
def main(args: Array[String]) { | |
println( | |
triplet(1, 2).filter{ case(a, b, c) => a*a + b*b == c*c} | |
.map{case (a, b, c) => a * b * c} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original source written by irof. | |
List list = [ | |
[color:'blue', weight:10], | |
[color:'red', weight:30], | |
[color:'blue', weight:50], | |
] | |
// Javaで | |
int weight1 = 0; |