Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114686 黎瑾萱 函数求和 C++ Accepted 1 MS 264 KB 242 2025-03-23 11:09:54

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int adj(int n,int m){ int h=0; for(int i=n;i<=m;i++){ h += i; } return h; } int main(){ cout<<adj(1,10)<<endl; cout<<adj(20,30)<<endl; cout<<adj(35,45)<<endl; return 0; }