Wrong Answer
Code
#include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include<unordered_set>
#define ll long long
using namespace std;
int main() {
string s;
ll n;
cin>>s;
cin>>n;
ll b=s[2]-'0';
ll a = s[0]-'0';
ll d = b-a;
ll sum = (n*(2*a+(n-1)*d))/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 17:26:55
- Judged At
- 2025-09-02 17:26:55
- Judged By
- Score
- 10
- Total Time
- 1ms
- Peak Memory
- 532.0 KiB