Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
int main() {
string s; cin >> s;
float n; cin >> n;
float a = s[0] - '0';
float b = s[2] - '0';
cout << a << " " << b << " " << n << endl;
float d = b - a;
float ans = (n / 2) * ( 2 * a + (n - 1) * d);
cout << ans << endl;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1231 Busy Friend
- Contest
- LUCC Presents Kick & Code Intra LU Programming Contest
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-09-01 05:44:22
- Judged At
- 2025-09-01 05:44:22
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 532.0 KiB