|
|
back to boardDiscussion of Problem 1068. Sumimport java.util.*; public class N1068 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if ((n>=1)&&(n<10000)) System.out.print(n *(n + 1) / 2); if ((n<1)&&(n>-10000)) System.out.print(-((-n) *(1 -n) / 2) + 1); } } что здесь не так? "Не превосходит" означает "меньше либо равно, но не больше" Edited by author 19.07.2016 19:08 |
|
|