add LC2 skeleton files for 7 ACM I/O patterns

This commit is contained in:
2026-06-06 17:31:07 +08:00
parent ec1fd8e96a
commit c19e666832
8 changed files with 451 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
//go:build ignore
// 特定结束符:读入整数,输入 0 时结束,每行输出该数的两倍
// 输入示例:
// 1
// 2
// 3
// 0
// 输出示例:
// 2
// 4
// 6
package main
import "fmt"
func main() {
for {
var n int
// TODO: 读入 n
if n == 0 {
break
}
fmt.Println(n * 2)
}
}