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
n = int(input()) | |
k = int(input()) | |
a = [x for x in range(1, n+1)] | |
for i in range(n): | |
if i == k: | |
del(a[i]) | |
b = a[i] | |
print(b) |
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
1.Алгоритм обхода в глубину - https://habrahabr.ru/post/200074/ | |
2.Алгоритм обхода в ширину - https://habrahabr.ru/post/200252/ | |
3.Алгоритм Дейкстры - https://habrahabr.ru/post/111361/ | |
4.Алгоритм Флойда — Уоршелла - https://habrahabr.ru/post/105825/ | |
5.Алгоритм Джонсона - https://ru.wikipedia.org/wiki/Алгоритм_Джонсона | |
6.Алгоритм Ли(волновой алгоритм) - https://ru.wikipedia.org/wiki/Алгоритм_Ли | |
7.Алгоритм Беллмана — Форда - https://habrahabr.ru/post/201588/ | |
1.https://sites.google.com/site/pythontutorarticles/obhod-v-glubinu | |
n = 10 |
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
var led = require("@amperka/led").connect(P5); | |
var ir = require("@amperka/ir-receiver").connect(P2); | |
ir.on("receive", function(code, repeat){ | |
console.log(code.toString(16)); | |
if(code.toString(16) == "3fcc33f"){ | |
led.toggle(); | |
} | |
else{ | |
console.log("Error, fubction is not found!"); |
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
var buz = require('@amperka/buzzer').connect(P5); | |
var ir = require("@amperka/ir-receiver").connect(P0); | |
//var button = require('@amperka/button').connect(P1); | |
//var pot = require("@amperka/pot").connect(A1); | |
var arr = [ | |
392, 392, 392, 311, 466, 392, 311, 466, 392, | |
587, 587, 587, 622, 466, 369, 311, 466, 392, | |
784, 392, 392, 784, 739, 698, 659, 622, 659, | |
415, 554, 523, 493, 466, 440, 466, 311, 369, |
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
var buz = require('@amperka/buzzer').connect(P5); | |
var button = require('@amperka/button').connect(P8); | |
var pot = require("@amperka/pot").connect(A0); | |
var ir = require("@amperka/ir-receiver").connect(P0); | |
function ReadVal(){ | |
var val = pot.read(); | |
var val1 = Math.floor(val * 10000); | |
console.log(val1); |
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
var buz = require('@amperka/buzzer').connect(P5); | |
var led = require('@amperka/led').connect(P2); | |
var button = require('@amperka/button').connect(P8); | |
function getRand(){ | |
return Math.round(Math.random()); | |
} | |
function TO(f, t){ | |
setTimeout(function(){ |
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
var ir = require("@amperka/ir-receiver").connect(P0); | |
var led = require("@amperka/led").connect(P2); | |
var opers = { | |
antimulti: { | |
str: "3fe8977", | |
value: "/" | |
},multi: { | |
str: "3ff8877", | |
value: "*" |
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
var ir = require("@amperka/ir-receiver").connect(P0); | |
var led = require("@amperka/led").connect(P2); | |
var light = require("@amperka/light-sensor").connect(A3); | |
var temp = require("@amperka/thermometer").connect(A5); | |
var nrm_t = 24; | |
var now_t = temp.read("C").toFixed(3); | |
var nrm_l = 350; |