Logo
(追記) (追記ここまで)

35097번 - 2025 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB14713311194.068%

문제

In Japan, the multiplication table below is learned in elementary schools.

Such a table with 9ドル \times 9$ items, called kuku in Japanese, is not necessarily a world standard. In some cultures, 12ドル \times 12$ or 20ドル \times 20$ tables are learned.

Interestingly, the total of all the 9ドル \times 9$ items in the kuku table is 2025ドル,ドル which happens to be this year. Are there any other interesting cases like this?

Your task is to compute, for a given integer $n,ドル the sum of all the items in an $n \times n$ multiplication table. More specifically, find $$\displaystyle\sum_{a=1}^n \sum_{b=1}^n ab\text{.}$$

입력

The input consists of at most 100ドル$ test cases. Each test case is a line containing one integer $n$ (1ドル ≤ n ≤ 100$).

The end of the input is indicated by a line consisting only of a zero.

출력

For each test case, output the value of $$\displaystyle\sum_{a=1}^n \sum_{b=1}^n ab$$ in a line.

제한

예제 입력 1

9
1
2
100
0

예제 출력 1

2025
1
9
25502500

노트

출처

ICPC > Regionals > Asia Pacific > Japan > Japan Domestic Contest > 2025 Japan Domestic Contest A번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /