トップページ数学
1002コメント509KB
面白い問題おしえて〜な 27問目
■ このスレッドは過去ログ倉庫に格納されています
0001132人目の素数さん
垢版 |
2018/07/29(日) 01:01:12.73ID:MbuK+QQd
過去ログ
http://www3.tokai.or.jp/meta/gokudo-/omoshi-log/

まとめwiki
http://www6.atwiki.jp/omoshiro2ch/

1 http://cheese.2ch.net/test/read.cgi/math/970737952/
2 http://natto.2ch.net/test/read.cgi/math/1004839697/
3 http://science.2ch.net/test/read.cgi/math/1026218280/
4 http://science.2ch.net/test/read.cgi/math/1044116042/
5 http://science.2ch.net/test/read.cgi/math/1049561373/
6 http://science.2ch.net/test/read.cgi/math/1057551605/
7 http://science2.2ch.net/test/read.cgi/math/1064941085/
8 http://science3.2ch.net/test/read.cgi/math/1074751156/
9 http://science3.2ch.net/test/read.cgi/math/1093676103/
10 http://science4.2ch.net/test/read.cgi/math/1117474512/
11 http://science4.2ch.net/test/read.cgi/math/1134352879/
12 http://science6.2ch.net/test/read.cgi/math/1157580000/
13 http://science6.2ch.net/test/read.cgi/math/1183680000/
14 http://science6.2ch.net/test/read.cgi/math/1209732803/
15 http://science6.2ch.net/test/read.cgi/math/1231110000/
16 http://science6.2ch.net/test/read.cgi/math/1254690000/
17 http://kamome.2ch.net/test/read.cgi/math/1284253640/
18 http://kamome.2ch.net/test/read.cgi/math/1307923546/
19 http://uni.2ch.net/test/read.cgi/math/1320246777/
20 http://wc2014.2ch.net/test/read.cgi/math/1356149858/
21 http://wc2014.2ch.net/test/read.cgi/math/1432255115/
22 http://rio2016.2ch.net/test/read.cgi/math/1464521266/
23 http://rio2016.2ch.net/test/read.cgi/math/1497416499/
24 http://rio2016.2ch.net/test/read.cgi/math/1502016223/
25 http://rio2016.5ch.net/test/read.cgi/math/1502032053/
26 http://rio2016.5ch.net/test/read.cgi/math/1518967270/
0872132人目の素数さん
垢版 |
2018/10/23(火) 12:41:03.14ID:ow6G4yxf
Prelude Data.List> let xs = concat $ iterate (¥x->[1:n| n<-x] ++ [2:n|n<-x]) [[1],[2]]
Prelude Data.List> xs !! 999
[2,2,2,2,1,2,1,1,2]
0874132人目の素数さん
垢版 |
2018/10/23(火) 13:00:38.96ID:3PnXS1dT
>>870
library(gtools)
perm=permutations(2,9,v=1:2,rep=T)
onetwo=function(x){
n=length(x)
sum(x*2^((n-1):0))
}

perm[which(apply(perm,1,onetwo)==1000),]

> perm[which(apply(perm,1,onetwo)==1000),]
[1] 2 2 2 2 1 2 1 1 2

と総当たりで出すには出せるが、全くエレガントでない :(
■ このスレッドは過去ログ倉庫に格納されています

ニューススポーツなんでも実況