Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = np.sum(np.arange(start=1, step=1, stop=N))
    print(ans)
if __name__ == '__main__':
    main()

Fixed submission:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #print(N)
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = (1 + (N - 1)) * (N - 1) // 2
    print(int(ans))
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = int(input())
    ans = (1 + (N - 1)) / 2 * (N - 1)

    if N <= 1e07:
      a = np.arange(start=1, step=1, stop=N+1)
      if N %2 == 1:
        bol = (a % ((N+1)/2) >= a)
        ans += np.sum((a % ((N+1)/2)[bol] - a[bol]))
      else:
        bol = (a % (N/2) >= a)
        ans += np.sum((a % (N/2)[bol] - a[bol]))
    print(int(ans))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #print(N)
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = (1 + (N - 1)) * (N - 1) // 2
    print(int(ans))
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = int(input())
    ans = (1 + (N - 1)) / 2 * (N - 1)

    if N <= 1e07:
      a = np.arange(start=1, step=1, stop=N+1)
      if N %2 == 1:
        bol = (a % ((N+1)/2) >= a)
        ans += np.sum((a % ((N+1)/2)[bol] - a[bol]))
      else:
        bol = (a % (N/2) >= a)
        ans += np.sum((a % (N/2)[bol] - a[bol])
    print(int(ans))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #print(N)
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = (1 + (N - 1)) * (N - 1) // 2
    print(int(ans))
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = int(input())
    ans = (1 + (N - 1)) / 2 * (N - 1)

    if N <= 1e07:
      a = np.arange(start=1, step=1, stop=N+1)
      if N %2 == 1:
        bol = (a % ((N+1)/2) >= a)
        ans += np.sum((a % ((N+1)/2)[bol] - a[bol]))
      else:
        bol = (a % (N/2) >= a)
        ans += np.sum((a % (N/2)[bol] - a[bol]))

    print(int(ans))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #print(N)
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = (1 + (N - 1)) * (N - 1) // 2
    print(int(ans))
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = int(input())
    ans = (1 + (N - 1)) / 2 * (N - 1)

    if N <= 1e07:
      a = np.arange(start=1, step=1, stop=N+1)
      if N %2 == 1:
        bol = (a % ((N+1)/2) >= a)
        ans += np.sum((a % ((N+1)/2)[bol] - a[bol])
      else:
        bol = (a % (N/2) >= a)
        ans += np.sum((a % (N/2)[bol] - a[bol])
       
      #print(a[bol])
      #print(bol)
      #print(np.any(bol))
      #if np.any(bol):
      #print((N % a)[bol])
      #print(((N % a)[bol]))
      #print(a[bol])
      #ans += np.sum((N % a)[bol] - a[bol])

    print(int(ans))

if __name__ == '__main__':
    main()

Fixed submission:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #print(N)
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = (1 + (N - 1)) * (N - 1) // 2
    print(int(ans))
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = int(input())
    ans = (1 + (N - 1)) / 2 * (N - 1)

    a = np.arange(start=1, step=1, stop=N+1)
    bol = (N % a >= a)
    #print(bol)
    #print(np.any(bol))
    #if np.any(bol):
    #print((N % a)[bol])
    #print(np.sum((N % a)[bol] - a))
    ans += np.sum((N % a)[bol] - a[bol])

    print(int(ans))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #print(N)
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = (1 + (N - 1)) * (N - 1) // 2
    print(int(ans))
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = int(input())
    ans = (1 + (N - 1)) / 2 * (N - 1)

    a = np.arange(start=1, step=1, stop=N+1)
    bol = (N % a > a)
    #print(bol)
    #print(np.any(bol))
    if np.any(bol):
        ans += np.sum((N % a)[bol] - a)

    print(int(ans))

if __name__ == '__main__':
    main()


Fixed submission:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #print(N)
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = (1 + (N - 1)) * (N - 1) // 2
    print(int(ans))
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = int(input())
    ans = (1 + (N - 1)) / 2 * (N - 1)

    a = np.arange(start=1, step=1, stop=N+1)
    bol = (N % a > a)
    if np.any(bol):
        ans += np.sum((N % a)[bol] - a)

    print(ans)

if __name__ == '__main__':
    main()

Fixed submission:
import sys
import numpy as np
def main():
    input = sys.stdin.readline
    N = np.int64(input())
    #print(N)
    #ans = np.int64((1 + (N - 1)) / 2 * (N - 1))
    ans = (1 + (N - 1)) * (N - 1) // 2
    print(int(ans))
if __name__ == '__main__':
    main()