This file contains hidden or 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
import java.util.Arrays; | |
public class Main { | |
/* | |
* Runtime is N² | |
* */ | |
public static boolean sum_in_array(int[] input_array,int input_K){ | |
for(int i=0;i < input_array.length;i++){ | |
for(int j = i + 1;j<input_array.length;j++){ | |
if(input_array[i] + input_array[j] == input_K) { |
This file contains hidden or 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
from pymycobot import MyCobot280 | |
from pymycobot import Angle | |
import time | |
mc = MyCobot280('/dev/ttyACM0') | |
mc.power_on() | |
mc.sync_send_coords([3.8, -94.3, 374.0, 10.93, 5.56, -24.74],50,0) | |
time.sleep(2.5) | |
mc.send_angle(Angle.J1.value, 90, 50) |