Run ID:88146
提交时间:2024-08-18 08:56:28
#include<iostream> using namespace std; int main(){ int a,b; int x=0,v=0; cin>>a>>b; for(int i=a;i<=b;i++){ if(i%2==1){ x=x+i; } else{ v=v+i; } } cout<<x<<" "<<v; return 0; }