Created
March 12, 2021 06:26
-
-
Save aquarla/16182be41cb75cf844b27df76d70789c to your computer and use it in GitHub Desktop.
九九の進捗がいまいちなこどものために無限に問題を作成するヤツ
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
# coding: utf-8 | |
100.times do |n| | |
str = "" | |
20.times do |i| | |
5.times do |j| | |
str += (rand(9)+1).to_s + "×" + (rand(9)+1).to_s + "= " | |
end | |
str += "\n" | |
end | |
File.open("./dst/" + Time.now.to_i.to_s + "_" + sprintf("%03d", n) + ".txt", "w") do |f| | |
f.write(str) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment