SEGMENT - Đoạn thẳng

View as PDF

Submit solution

Points: 1.00 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
C, C#, C++, Go, Java, Pascal, Perl, PHP, Python, Ruby, Rust, Scratch, Swift

Cho ~n~ điểm phân biệt trên mặt phẳng, hỏi có bao nhiêu đoạn thẳng có độ dài dương mà hai đầu mút là hai điểm trong số ~n~ điểm trên?

Input

  • Gồm một dòng duy nhất chứa số nguyên dương ~n\ (1≤n≤10^6 )~.

Output

  • Một số nguyên duy nhất là đáp số bài toán.

Sample

Input #1
3
Output #1
3

Problem source: Chuyên Sơn La Online Judge


Comments

Please read the guidelines before commenting.


There are no comments at the moment.