Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int x=s[0]-'0';
int y=s[2]-'0';
int sum=0;
int d=y-x;
int b;cin>>b;
sum+=(2*x+(b-1)*d);
sum=(sum*b)/2;
cout<<sum<<endl;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1231 Busy Friend
- Contest
- LUCC Presents Intra LU Junior Programming Contest - Replay
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-09-02 16:35:36
- Judged At
- 2025-09-02 16:36:39
- Judged By
- Score
- 10
- Total Time
- 1ms
- Peak Memory
- 764.0 KiB