Imports System
Public Module VBModule
Public Sub Main()
Dim factor as integer
DIm input as integer
Dim tempinput as integer = input
Dim h as integer = 1
Dim i as integer
DIm j as integer
Dim counter as integer
Dim total as integer = 1
While total < 500
input = (h*(h+1)/2)
For i = 2 to input
If input mod i = 0
counter = 0
For j = 2 to math.floor(math.Sqrt(i))
If i mod j = 0
counter = counter + 1
End If
next
If counter = 0
factor = i
tempinput = input
While tempinput mod factor = 0
tempinput = tempinput / factor
End While
total = total * (counter + 1)
h = h + 1
Console.WriteLine(input)
End Sub
End Module