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
(* http://yukicoder.me/problems/no/47 *) | |
ans[n_] := Ceiling[Log[2, n]] |
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
(* http://yukicoder.me/problems/no/53 *) | |
a[k_] := 3^k/4^(k - 1) | |
N[a[100]] |
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
(* http://yukicoder.me/problems/no/53 *) | |
N[RecurrenceTable[{4 a[k] == 19 a[k - 1] - 12 a[k - 2], a[0] == 4, a[1] == 3}, a, {k, 0, 100}]] |
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
(* http://yukicoder.me/problems/no/55 *) | |
pLi = Complex[#[[1]], #[[2]]] & /@ | |
Partition[ImportString["8 10 14 14 13 9", "Table"][[1]], 2]; | |
dLi = Abs[RotateLeft[pLi, 1] - RotateLeft[pLi, 2]]; | |
permLi = Permutations[pLi]; | |
p4Li = (#[[2]] + I (#[[1]] - #[[3]])) & /@ permLi; | |
sqLi = Table[Append[permLi[[n]], p4Li[[n]]], {n, 1, Length[permLi]}]; | |
edgeLen[pLi_] := Abs[pLi - RotateLeft[pLi]]; | |
judgeLi = SameQ @@ # & /@ (edgeLen /@ sqLi); | |
pos = Position[judgeLi, True]; |
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
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<!--hoge--> | |
foo | |
<!--piyo--> | |
bar | |
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
</body> |
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
-5 % 2 |
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
(* http://yukicoder.me/problems/no/106 *) | |
(* TLEで失敗しました。 *) | |
f[n_, k_] := Length[Select[Table[Length[FactorInteger[m]], {m, 2, n}], # >= k &]] | |
f[2, 1] | |
f[4, 2] | |
f[1000, 4] |
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
({}) !== ({}); // == ? |
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
function plus(x, y) { | |
return x + y; | |
} | |
ans = plus(5, 3); | |
console.log(ans); // => 8 |
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
一 | |
一_(緑茶飲料) | |
一_茶花 | |
一〇〇式 | |
一〇〇式三十七粍戦車砲 | |
... | |
龜山鄉 | |
龜田鵬齋 |