5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AtCoderの問題をランダムで表示するブックマークレットを作りました。

Posted at

AtCoderを日課にしようと意気込む事、誰しもが経験すると思います。
そんなモチベーションを持続させる為にAtCoderの問題をランダムで表示するブックマークレットを作りました。

AtCoder Beginner Contest(ABC:初級者向け)をランダムで開く

ブックマークレット
javascript:(function() { var arr = [ "a", "b", "c", "d" ] ; var chr = arr[ Math.floor( Math.random() * arr.length ) ] ; var min = 1 ; var max = 102 ; var ran = Math.floor( Math.random() * (max + 1 - min) ) + min ; var num = ('0' + ran).slice(-3); var newurl="https://abc" + num + ".contest.atcoder.jp/tasks/abc" + num + "_" + chr ; window.open(newurl); })();

AtCoder Regular Contest(ARC:中級者/上級者向け)をランダムで開く

ブックマークレット
javascript:(function arcrand() { var arr = [ "a", "b", "c", "d" ] ; var chr = arr[ Math.floor( Math.random() * arr.length ) ] ; var min = 1 ; var max = 100 ; var ran = Math.floor( Math.random() * (max + 1 - min) ) + min ; var num = ('0' + ran).slice(-3); var newurl="https://arc" + num + ".contest.atcoder.jp/tasks/arc" + num + "_" + chr ; window.open(newurl); })();

作った理由

  • 問題選ぶのが面倒くさい!
  • パパっと1問だけやりたい!
  • 難しい(;_;)

たまに失敗してABCおよびARCのトップページが開きます。

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?