Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
97576 揭伟琦 函数求和 C++ Accepted 0 MS 260 KB 248 2024-11-16 11:23:08

Tests(1/1):


Code:

#include<iostream> using namespace std; int hs(int a,int b){ int h=0; for (int i=a;i<=b;i++){ h+=i; } return h; } int main(){ cout <<hs(1,10)<<endl; cout <<hs(20,30)<<endl; cout <<hs(35,45)<<endl; return 0; }