Akizumi's Layer
  • Home
  • Archives
  • Categories
  • Tags
  • About
July 17, 2023
215 words 2 mins

50079. Apple Pile

難度:1/5

1
2
3
4
5
6
7
8
9
10
11
#include <stdio.h>
#include <stdlib.h>

int main(){
int a, b;
scanf("%d %d", &a, &b);
int sum = (a + b) * (b - a + 1) / 2;
int len = (a + b) + (b - a - 1) * 2;
printf("%d\n%d\n", sum, len);
}


Coding > Solutions > Judge Girl > 2017
#constructive
50079. Apple Pile
https://aaronlin1229.github.io/judgegirl_50079/
Author
Akizumi
Posted on
July 17, 2023
Licensed under
50080. Scan The Blocks Previous
50078. Parallelogram Next

Table of Contents

Search

HexoFluid