4 solutions

  • 1
    @ 2024-7-20 20:43:03

    这是一题肥肠煎蛋的一道加法dfs(深搜)题👀️

    #include <bits/stdc++.h>
    using namespace std;
    int a, b;
    
    void dfs(int ans) {
    	if (ans = a + b) {
    		cout << ans;
    		return;
    	}
    	dfs(ans + 1);
    }
    
    int main() {
    	cin >> a >> b;
    	dfs(0);
    	return 0;
    }
    

    Information

    ID
    595
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    4
    Tags
    (None)
    # Submissions
    23
    Accepted
    17
    Uploaded By