Accepted
Code
#include <stdio.h>
long long max_points(long long N) {
long long lanterns = N / 500;
long long banners = (N % 500) / 5;
return (lanterns * 1000) + (banners * 5);
}
int main() {
long long N;
scanf("%lld", &N);
printf("%lld\n", max_points(N));
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1132 Festivity Frenzy!
- Contest
- Brain Booster #8
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2025-02-17 15:49:27
- Judged At
- 2025-02-17 15:49:27
- Judged By
- Score
- 100
- Total Time
- 0ms
- Peak Memory
- 344.0 KiB