1.三个引号里的字符串可以直接打印
println("""aaaaa/bbbbb:;dcsadsd0294""")
2.while求最大公约数
def gcdLoop(x: Long, y: Long): Long = {
var a = x
var b = y
while (a != 0) {
val temp = a
a = b % a
b = temp
}
b
}
3.
时间: 2024-11-09 01:42:55
1.三个引号里的字符串可以直接打印
println("""aaaaa/bbbbb:;dcsadsd0294""")
2.while求最大公约数
def gcdLoop(x: Long, y: Long): Long = {
var a = x
var b = y
while (a != 0) {
val temp = a
a = b % a
b = temp
}
b
}
3.