This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://projecteuler.net/problem=1 | |
puts "Find the sum of all the multiples of 3 or 5 below which number?" | |
STDOUT.flush #clears the buffer | |
max_num = Integer(gets.chomp) | |
def sum_x3_x5(num) | |
sum = 0 | |
(1..num).each do |n| | |
sum = sum + n if (n % 3 == 0) || (n % 5 == 0) #Add if n is divisible by 3 or 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#simplest autoclicker ever | |
import win32api | |
import win32con | |
import time | |
import sys | |
def click(x,y): | |
win32api.SetCursorPos((x,y)) | |
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0) |
NewerOlder