Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115414 王珠潏 函数求和 C++ Accepted 1 MS 260 KB 241 2025-03-30 13:33:57

Tests(1/1):


Code:

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