-
Notifications
You must be signed in to change notification settings - Fork 8
議事録(56)
yowasou edited this page Aug 13, 2023
·
2 revisions
議事録(56)
- 名札セット用意しておく。最低でも名前とtwitter idを。
- LT場合によっては長めに。5分だとたいていオーバーする。
- 同じ課題を共有した方が話題が盛り上がった
- 発表がある方は、先に長いかどうか聞いておく。
- 時間は今回気を付けよう
- AWSカルタみたいのをRubyでつくりたい。
- 環境無い人でも楽しめる何か(ずっと言われてる)
- 問題減らしてレビュー時間増やしたい。さっそくやってみたい。
- LT告知が冒頭なのもありか?
- 特定のお題について話し合いたい
- (前回、ばらばらのお題だと盛り上がりに欠けたので)全員でpaizaの問題をやろう
- https://paiza.jp/poh/joshibato
女子高生プログラマー・京子・リオ・つばめの中から好きな一人を選んで、コボールウイルスのプログラミング問題に挑戦!
正解にたどり着ければ彼女たちの世界が救われます!女子高生プログラマーたちの運命やいかに…?
そしてあなたならどの子を選びますか? 選ぶキャラクターによって問題が変わります。
- 六村リオミッションが6人
- 霧島京子ミッション6人
#六村リオミッション1
def azimi(oyu,hunmatsu,g)
return oyu - g * oyu / (oyu + hunmatsu)
end
n = gets.to_i
oyu = 0.0 #お湯
hunmatsu = 0.0 #コーヒー粉末
n.times{
g = gets
s = g.chomp.split(" ")
#最初の数値は処理の種類
if (s[0] == "1") then
oyu = oyu + s[1].to_i
end
if (s[0] == "2") then
hunmatsu = hunmatsu + s[1].to_i
end
if (s[0] == "3") then
oyu1 = oyu
oyu = azimi(oyu,hunmatsu,s[1].to_i)
hunmatsu = azimi(hunmatsu,oyu1,s[1].to_i)
end
}
#濃度を出力
print (100 * hunmatsu / (oyu + hunmatsu)).floor
Add Comment Collapse
water = 0.0
coffee = 0.0
n = gets.chomp.to_i
n.times do
input = gets.chomp.split(" ")
operation = input[0].to_i
weight = input[1].to_i
if operation == 1
# お湯
water += weight
elsif operation == 2
# コーヒー
coffee += weight
else
# ごくごく
total = water+coffee
water = water-weight*water/(total)
coffee = coffee-weight*coffee/(total)
end
end
puts (coffee*100/(water+coffee)).to_i
n = gets.to_i
water = 0.0
coffee = 0.0
n.times do
line = gets.chomp.split(" ")
operation = line[0].to_f
amount = line[1].to_f
case operation
when 1 then
water += amount
when 2 then
coffee += amount
when 3 then
total_amount = water + coffee
water -= amount * water / total_amount
coffee -= amount * coffee / total_amount
end
end
puts (100 * coffee / (water + coffee)).to_i
Add Comment Collapse
input_lines = gets.to_i
water, coffee = 0.0, 0.0
input_lines.times {
operation, gram = gets.chomp.split(" ").map(&:to_i)
if operation == 1
water = water + gram
elsif operation == 2
coffee = coffee + gram
elsif operation == 3
total = water + coffee
water = water - (gram * water / total)
coffee = coffee - (gram * coffee / total)
end
}
percent = coffee / (coffee + water) * 100
print percent.to_i
Add Comment Collapse
- もっと協力プレイを促せばよかったです
n = gets.to_i
w = 0.0
c = 0.0
n.times{
s = gets.chomp.split(" ")
#print "hello = ",s[0]," , world = ",s[1],"\n"
case s[0].to_i
when 1
w += s[1].to_i
when 2
c += s[1].to_i
when 3
wo = w
w -= s[1].to_i * w / ( w + c )
c -= s[1].to_i * c / ( wo + c )
end
}
puts ( c / ( w + c ) * 100 ).to_i
water = Rational(0.0)
coffee = Rational(0.0)
gets
while line = gets
type, value = line.split(' ')
type, value = type.to_i, Rational(value)
case type
when 1
water += value
when 2
coffee += value
when 3
total = water + coffee
water -= value * (water / total)
coffee -= value * (coffee / total)
end
end
puts (coffee / (water + coffee) * 100).truncate
input = <<-EOS
5
0 1 0 1 0
4
1
1
2
3
EOS
lines = input.each_line
lines.shift
values = lines.shift.split(' ').map(&:to_i)
lines.shift
dices = lines.map(&:to_i)
dices.each do |current|
histories = [current]
value = values[current]
catch :loop do
until value == 0
if value.nil?
puts 'No'
throw :loop
end
current += value
if histories.include?(current)
puts 'No'
throw :loop
end
histories << current
value = values[current]
end
if (current + 1) == values.size
puts 'Yes'
else
puts 'No'
end
end
end
length = gets.chomp.to_i
grids = gets.chomp.split(" ").map(&:to_i)
dice_num = gets.chomp.to_i
dice_num.times do
turn = 0
dice = gets.chomp.to_i
move = grids[dice]
while move != 0 && turn < length && grids[dice]
dice += move
move = grids[dice]
turn += 1
end
puts grids.size == dice + 1 ? 'Yes' : 'No'
end
- http://www.slideshare.net/KenichiTachibana/a-huge-change-rails-5-is-approaching-fast
- Rails APIが入る。
- RailsをAPIサーバーとしてのみ使うGem。
- WebSocketsを使う
- Turbolinks 3.0
- or条件が来た(default_scopeに注意)
- belongs_toはデフォルト必須に
- without便利
- マイナス、プラス、ゼロを判断するメソッドがそれぞれある
- weekendは祝日考慮しない(あくまで週末)
- Custom Form Builder
- config.filter_parametersでログ内容を暗号化できる
- 各自スライドを読んで質問してください。
- SWEST17で「mrubyの現状と事例紹介」の発表がある 宣伝
- Lua ... Cとrubyのあいのこ。軽くて速い?
- マルチスレッド機能もある。ゲームのUIとかで使われている
- スクリプトの言語の中では早くてサイズが小さい。
- mrubyの目指していたところとかぶっている。
- mrubyは開発者が少ない。最近デバッガーが実装された。
- どんどん使っていこうみたいな宣伝がされている。
- はじめはluaの置き換えを考えていたが、機能が多くて重いので置き換えにはならない。
- フルのrubyでいいじゃないか?>mrubyのうまい使い方を教えてほしい。
- Java以上にWriteOnce。いろいろな機器で動く。
- どっかでいじってこの会で発表したい。
- グループ全員問題解けた
- 5~6人チーム継続
- 10月からはたぶん毎月来れる
- 台風に勝った
- Paizaの問題よかった(でも難しかった)
- 参加できた
- 発表の時間見積もりを
- 初心者ですがRailsの勉強に何見たらいいですか?->RailsGuide、Railsチュートリアル
- 問題の難易度が高かった(キリシマェ…)
- 難易度に差があった
- 遅れるときにどうにか連絡する。
- 時間配分
- 台風のせい?テンション低めだった
- コード書くときググりまくり
- 次回Itamaeについて話す
- ほかの人ともっと話したりコードを見たりする
- もくもくの流れを説明する
- チームプレイを促す
- 次はもっと短い発表考えてきます
- 基本的な構文を覚える(チートシートでもいいのよ)
- ひさびさにRuby関係ないLT考える