kamacoder-solutions icon indicating copy to clipboard operation
kamacoder-solutions copied to clipboard

卡码网题解全集

Results 28 kamacoder-solutions issues
Sort by recently updated
recently updated
newest added

## 最简单的解法 ```java import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int a = scanner.nextInt(); int b =...

``` #include #include using namespace std; class Tree { public: Tree(char value) { val = value; } char val; Tree* leftTree = NULL; Tree* rightTree = NULL; }; Tree* GetBinnaryTree(string...

```go package main import "fmt" func main() { for { var n int if _, err := fmt.Scanf("%d", &n); err != nil { return } for i := 0; i...

`package main import "fmt" func main() { var m, n int fmt.Scan(&m, &n) materialSpaces := make([]int, m) for i := range materialSpaces { fmt.Scan(&materialSpaces[i]) } materialValues := make([]int, m) for...

疑问:请问这道题的判断是不是有误呢?或说必须按照某种格式来呢? 背景:我尝试过用自己的解法在本地输出,输出结果与预测答案是一致的,但是无法在卡码网通过。另外,我也尝试过给推荐的方法修改大于等于小于的顺序,发现当等于的类别放在if或elif中的时候,代码也无法通过。 猜测:一般情况下,按照数值对比,等于号是不存在特殊情况的;但是如果将其地址值作为评判标准之一,就有可能无法通过。所以,麻烦大神检查一下~ 谢谢

```c++ #include #include #include using namespace std; // 这一层旋转k , 下一层旋转 2 * k void myreverse(vector &tree, int i , int k ){ if(i == tree.size() ){ return; } //...

测试用例如下: 4 4 7 0 0 1 1 1 2 2 3 0 1 3 2 3 3 预期输出:1 2 2 3 2 3 2 实际输出:1 2 2 3 2...

在A+B问题III中的Python代码中: ************************************************************************************************************************************* import sys while True: s = input().split() # 一行一行读取 a, b = int(s[0]), int(s[1]) if not a or not b: # 遇到 0, 0 则中断 break print(a +...

只有对中间相乘结果超过long long 范围的都对10^9+7取余,相加时候保存为int,才能和正确答案匹配,这感觉不符合题意,应该增加限制条件。

![issue](https://github.com/youngyangyang04/kamacoder-solutions/assets/83491835/b0db75a9-f002-4e76-8581-6188408619f6)