Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
164760 杜禹轩 函数求和 C++ Accepted 1 MS 260 KB 235 2026-11-07 14:21:51

Tests(1/1):


Code:

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