[BOJ 8870] Zadanie próbne

View as PDF

Submit solution

Points: 2
Time limit: 1.0s
Memory limit: 128M

Problem type
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
int ret = 0;
for(int s = 1; s<=n; s++) {
  for(int k = s; k<=n; k++) {
    for(int i = k; i<=n; i++) {
      ret = (ret+s*k/i)%2010;
    }
  }
}

입력 형식

W pierwszej i jedynej linii wejścia znajduje się wartość zmiennej n (1<=n<=2010).

출력 형식

Twój program powinien wypisać pojedyncza liczbę - wartość zmiennej ret po wykonaniu pętli.

예제 입력

5

예제 출력

48

Comments

There are no comments at the moment.