text:
Generalized FiveThirtyEight Sequences
Adapted from this FiveThirtyEight riddle.
Background
Examine the following infinite sequence:
3 3 3 2 3 3 3 2 3 3 3 2 3 3 2 3 3 3 2 ...

Let's say the sequence is 1-indexed. The ith number in the sequence determines how many 3s there are before the ith 2 and following any previous 2s. So since the sequence starts with a 3 the sequence must begin 3 3 3 2 and since there are three 3s at the beginning of the sequence the subsequence 3 3 3 2 must repeat itself three times. After that you reach 3 3 2 because the fourth number in the sequence is 2.
The FiveThirtyEight riddle asks for the limit of the ratios of threes to twos (which I won't spoil here) but you can also ask what the cumulative ratio is after index i. For example the ratio at i=4 is 3/1 = 3 and at i=15 it's 11/4 = 2.75.
Let's get general
Given numbers n and k we can make a similar sequence that starts with n and just like the original sequence described the number at index i determines how many ns show up before the ith k and following any previous ks.
Examples:
n=2, k=5 gives the sequence 2 2 5 2 2 5 2 2 2 2 2 5 2 2 5 ...
n=3, k=0 gives 3 3 3 0 3 3 3 0 3 3 3 0 0 3 3 3 0 ...
n=1, k=3 gives 1 3 1 1 1 3 1 3 1 3 1 3 1 1 1 3 1 ...
The Challenge
Write a function/program and with it do the following. Take as input:

a positive integer n
a nonnegative integer k ≠ n
a positive integer i > n

The first two inputs n and k determine a sequence as described above and i is an index. I am using 1-indexing in the examples but you have the freedom to use 0- or 1-indexing. If 0-indexed then the restriction on i is i ≥ n.
With the three numbers output the ratio of ns to ks in the sequence up to and including the number at the index i. The format of the output can either be a decimal value with at least 5 digits of precision or an exact value as a ratio like 3524/837 or 3524:837.
In decimal form, the last digit can be rounded however you like. Trailing zeros and whitespace are allowed.
In either of the string forms the two numbers need to be normalized so that they are coprime. For example if the ratio was 22/4, 11/2 and 11:2 are acceptable but 22/4 is not.
Examples
n   k   i      output
2   4   15     2.75     or   11/4
6   0   666    5.1101   or   557:109
50  89  64     63       or   63:1
3   2   1000   2.7453   or   733/267
9   12  345    9.4545   or   104/11

This is code golf per language, so shortest code in each language is the winner.

Related. Related.

I recommend allowing a pair of integers as a ratio, needing answerers to separate the numbers with / or : just adds an unnecessary complication to the challenge.

@EriktheOutgolfer a decimal number is allowed too

Is a standard float exact enough for the decimal output?

@iamnotmaynard I’m not strict about the float format so yes I think so

Husk, 16 bytes
¤/#ωȯ↑⁰J¹`C∞²N¹²

Try it online!
Takes inputs in the same order as the test cases.
Outputs a rational number.
I feel like this has too many superscripts, but I don't know how to get rid of them...
Explanation
¤/#ωȯ↑⁰J¹`C∞²N¹²  Inputs are n, k, i.
             N    Starting with the natural numbers [1,2,3..
   ωȯ             do this until a fixed point is reached:
                    Argument is a list s.
           ∞²       Take the infinite list [n,n,n..
         `C         and split it to the lengths in s.
       J¹           Join the resulting blocks with k.
     ↑⁰             Take the first i elements.
                  Call the result x.
¤             ¹²  For each of n and k,
  #               count their number of occurrences in x
 /                and perform exact division on the results.

Jelly,  25  16 bytes
-9 bytes ~50% attributable to Erik the Outgolfer's Jelly answer (1. using the new-ish key quick ƙ even with a bug in the interpreter currently costing a byte; 2. using a mapped repetition to avoid counting and indexing into the current sequence.) Go give him some credit!
³ẋÐ€j⁴ṁ⁵µÐLLƙ`÷/

A full program taking three arguments: n, k, i which prints the result.
Try it online!
How?
³ẋÐ€j⁴ṁ⁵µÐLLƙ`÷/ - Main link
        µ        - monadic chain separation
         ÐL      - apply the monadic chain to the left repeatedly until no change occurs:
³                -   program's 1st argument, n
  Ð€             -   map across the current sequence (initially just n)
 ẋ               -     repeat (the first run give triangle of n i.e. [[n],[n,n],...,[n]*n]
     ⁴           -     program's 2nd argument, k
    j            -     join
       ⁵         -     program's 3rd argument, i
      ṁ          -     mould like (repeat the list to fill, or cut it, to length i)
            ƙ    - keyed application, map over groups of identical items:
             `   - (this has an arity of 2, make it monadic by repeating the argument)
           L     -   length -> [numberOfNs, numberOfKs]
               / - reduce with:
              ÷  -   division -> [numberOfNs / numberOfKs]
                 - implicit print (a single item list just prints its content)

example run with inputs n=2, k=3, i=30:
Start the "loop until no change", ÐL
Note: Initial left argument, n=2, implicitly range-ified by Ð€ to become [1,2]
1. mapped repeat of n: [[2],[2,2]]
          join with k: [2,3,2,2]
         mould like i: [2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3]

2. mapped repeat of n: [[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2]]
          join with k: [2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2]
         mould like i: [2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2]
                          ^different to previous result

3. mapped repeat of n: [[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2]]
          join with k: [2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2]
         mould like i: [2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2]
                                  ^different to previous result

4. mapped repeat of n: [[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2]]
          join with k: [2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2]
         mould like i: [2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2]
                                                      ^different to previous result

5. mapped repeat of n: [[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2],[2,2],[2,2,2],[2,2]]
          join with k: [2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2]
         mould like i: [2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,2,3,2,2,3,2,2,3,2,2,3,2]
                       all the same as the previous result; stop loop and yield this.

length applied to equal elements: [length([2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]), length([3,3,3,3,3,3,3,3,3])]
                                = [21,9]
reduce by division              = [21/9] = [2.3333333333333335]
implicit print                  2.3333333333333335

Python 3, 94 92 89 87 bytes
def g(n,k,i):o,t=[n],0;exec('o+=[n]*o[t]+[k];t+=1;'*i);return-1-i/(o[1:i+1].count(n)-i)

Try it online!
Credits

Reduced from 94 to 92 bytes: Colera Su.
Reduced from 92 to 89 bytes: dylnan.
Reduced from 89 to 87 bytes: ovs.

Shouldn't it be .count(n)?

@ColeraSu Thanks.  Don't know how I missed that, fixed.

92 bytes.

@ColeraSu Thanks, updated. I'll try to start using exec's.  That's pretty cool.

89 bytes

@dylnan Thanks, updated. The change of input threw me off a bit (but I figured it out).

Oh haha sorry didn't mean to do that

@ovs  Thanks, that's some pretty useful math.  Now, I'm tied with Mathematica!

Jelly, 22 bytes
³ẋÐ€;€⁴Ẏḣ⁵
ẋ`;ÇÐLLƙ`÷/

Try it online!
Full program. Takes arguments n, k, i.
There's a bug that makes this need to be unnecessarily longer by 1 byte.

Used some of your tricks - nice. Wondering about what the correct fix for the bug should really be...

@JonathanAllan What struck me is this line, although not sure why putting a ``` makes it work. Oh, and where your answer differs is that I forgot to implement a golf I found in another language >_>

Mathematica, 85 bytes
(s={#};Do[s=Join[s,#~Table~s[[t]],{#2}],{t,#3}];Last@@Ratios@Tally@s[[#+3;;#3+#+2]])&

Try it online!

APL (Dyalog Unicode), 126 70 bytes
k n i←⎕
j←⍴v←⍬
:While j<i
v,←k,⍨n⍴⍨{v≢⍬:j⊃v⋄n}j+←1
:End
÷/+/¨n k⍷¨⊂j⍴v

Try it online!
Well, thanks to @Adám for obliterating 56 bytes out of this answer.
This is a niladic Tradfn (traditional function) taking 1 input, which is a 3 element list.
⎕PP←5 is not added to the byte count because it's only used to limit the Print Precision to 5 digits.
∇f and ∇ are not added to the byte count because they're not part of the code, only delimiters for the tradfn.
How it Works:
k n i←⎕                   ⍝ Take input (←⎕) for k, n and i.
j←⍴v←⍬                    ⍝ Assign (←) an empty vector (⍬) to v, then assign its shape (⍴, which is 0) to j.
:While j<i                ⍝ while j<i, do:
v,←k,⍨n⍴⍨{v≢⍬:j⊃v⋄n}j+←1 ⍝ this:
                     j+←1 ⍝ increment j (+←1)
          {v≢⍬:     }     ⍝ if (:) v does not match (≢) ⍬
               j⊃v        ⍝ return the jth element of v (v[j])
                  ⋄n      ⍝ else (⋄) return n
      n⍴⍨                 ⍝ shape (⍴) n as the result (repeats n result times)
   k,⍨                    ⍝ append (,⍨) k
v,←                       ⍝ append to (,←) v
:End                      ⍝ End while loop
÷/+/¨n k⍷¨⊂j⍴v            ⍝ then:
           j⍴v            ⍝ shape (⍴) v as j (truncates v to j elements)
          ⊂               ⍝ enclose the resulting vector
         ¨                ⍝ for each element
        ⍷                 ⍝ find (returns a boolean vector)
     n k                  ⍝ n and k (⍷ will return a boolean vector for each)
  +/¨                     ⍝ cumulative sum of each vector (returns the number of times n and k appear in v)
÷/                        ⍝ divide them and implicitly return the result.

R, 88 bytes
function(n,k,i){s=rep(n,n);for(j in 1:i){s=c(s,k,rep(n,s[j]))};z=sum(s[1:i]==n);z/(i-z)}

Try it online!

you can get rid of the braces around the for loop body as there's only one statement.

Swift, 152 bytes
func f(n:Int,k:Int,i:Int){var a=[0];(1...i).map{a+=(0..<(a.count>$0 ?a[$0]:n)).map{_ in n}+[k]};let m=a[1...i].filter{n==$0}.count;print("\(m)/\(i-m)")}

Will it be shorter than Java?
Explanation
func f(n:Int,k:Int,i:Int){
  var a=[0]                                    // Initialize the array (the zero is to
                                               //  define the type of the array and will be
                                               //  ignored by the code)
  (1...i).map{                                 // Repeat i times (more than enough):
    a+=(0..<(a.count>$0 ?a[$0]:n)).map{_ in n} //  Add the right amount of n:s to the array
      +[k]                                     //  Add k to the array
  }                                            // End repeat
  let m=a[1...i].filter{n==$0}.count           // Count the amount of n:s in the first
                                               //  i elements of the array
  print("\(m)/\(i-m)")                         // Print the result
}

Ruby, 77 71 70 bytes
->n,k,i{r=[n]
i.times{|c|r+=[n]*r[c]+[k]}
1r*(j=r[1,i].count n)/(i-j)}

Try it online!
Returns a Rational, which both operates as a number and stringifies to the exact reduced fraction.

Zephyr, 284 bytes
input n as Integer
input k as Integer
input m as Integer
set s to Array(m)
for i from 1 to n
set s[i]to n
next
set s[i]to k
set N to n
set K to 1
for a from 2 to m
for b from 1 to s[a]
inc i
if i<=m
set s[i]to n
inc N
end if
next
inc i
if i<=m
set s[i]to k
inc K
end if
next
print N/K

Takes the three numbers from stdin on three separate lines. Outputs an exact ratio such as 104/11 or 63.
Ungolfed
input n as Integer
input k as Integer
input maxIndex as Integer

set sequence to Array(maxIndex)
for i from 1 to n
    set sequence[i] to n
next
set sequence[i] to k

set nCount to n
set kCount to 1

for a from 2 to maxIndex
    for b from 1 to sequence[a]
        inc i
        if i <= maxIndex
            set sequence[i] to n
            inc nCount
        end if
    next
    inc i
    if i <= maxIndex
        set sequence[i] to k
        inc kCount
    end if
next

print nCount / kCount

Pyth, 24 bytes
AEtcH/e.u<sm+*d]QGNH]Q)G

Test suite.
Fixed point of [n] under certain function of array.


text:
How many instances are running?
Write an indefinitely-running program that reports how many instances of itself are currently running. Each instance of the program should also report the order in which it was opened out of all other currently-running instances.
Example
The user launches the program for the first time - we'll call this Instance 1. Instance 1 displays 1/1, because it is the first instance to be launched out of a total of 1 currently-running instances.
While Instance 1 is running, the user launches the program a second time to become Instance 2. Instance 1 now displays 1/2, being the first instance out of a total of 2 currently-running instances. Instance 2 displays 2/2, because it is the second instance out of a total of 2 currently-running instances.
Let's say the user continues to spawn more instances until there are 5 of them. In order of launch, their outputs are: 1/5 2/5 3/5 4/5 5/5.
Now, let's say the user decides to terminate Instance 3. Instance 4 then becomes the new Instance 3 and Instance 5 the new Instance 4, because they are respectively the third and fourth instances to have been launched out of what is now a total of 4 instances. So each instance's change in output would be as follows:

1/5 → 1/4
2/5 → 2/4
3/5 → (Terminated)
4/5 → 3/4
5/5 → 4/4

Rules

You may output the two numbers (instance number, total instances) in any reasonable format.
Whenever an instance is launched or terminated, all other instances must update their respective outputs within 100 milliseconds.
If you choose to update output by printing to a new line (or other "appending" output format; as opposed to replacement), you must print only when the number of instances changes, and not at any other time.
This is code golf. Shortest program in bytes wins.
In your answer, you are encouraged to specify what the user must do to open more than one instance, and/or record a screencast to demonstrate.

Anyone have suggestions for tags to include?

Such a program would be OS-specific.

Is "Whenever an instance is launched or terminated, all other instances must update their respective outputs within 100 milliseconds" even within our control given that we must rely on the OS to communicate (and the fact that we could spawn many, many processes can't help)?

@Ouros process interoperation cannot be independent of the OS

APL (Dyalog Unicode), 39 bytesSBCS
Anonymous prefix function. Call by spawning on the dummy argument ⍬ (empty numeric vector), i.e. f&⍬. Query currently running threads with ⎕TNUMS and kill one or more threads with ⎕TKILL n. Threads output changes in [own number, total number] as soon as they get processor time, i.e. pretty much instantly.
{⍵≡n←n[⍋n←⎕TNUMS~0]:∇n⋄∇n⊣⎕←n⍳⎕TID,⊢/n}

Try it online!
{…} anonymous lambda where ⍵ is the argument (initially ⍬, the empty numeric vector)
 n[…] index n (to be defined) with:
  ⎕TNUMS~0 all Thread Numbers except number 0 (the REPL)
   n← store as n
   ⍋ permutation which would sort ascending
  now we have the active threads in order
  ⍵≡ if the argument is identical to that…
  : then:
   ∇⍵ tail recurse on the argument
  ⋄ else:
   ⊢/n the rightmost thread number
   ⎕TID, this Thread's ID (thread number) prepended to that
   n⍳ find the ɩndices of those two
   ⎕← print that to STDOUT
   n⊣ discard that in favour of n
   ∇ recurse on that

Python 3, 694 691 bytes
main.py
from requests import post as u
from _thread import*
import os
os.system("start cmd /C python s")
def l():
 def p(q):
  while 1:print(u(*q).text,end="\r")
 q=['http://localhost']
 q+=[u(q[0],'*').text]
 start_new_thread(p,(q,))
 input()
 u(q[0],'-'+q[1])
while 1:
 try:l();break
 except:0

s (short for server.py)
from bottle import*
from requests import post as q
try:
 q("http://localhost")
except:
 ids=["0"]
 @post('/')
 def _():
  content = request.body.read().decode('utf-8')
  if len(content)==0:return""
  if content[0]=="*":ids.append(str(int(ids[-1])+1));return str(ids[-1])
  elif content[0]=="-":del ids[ids.index(content[1:])]
  else:return str(ids.index(content)) + "/" + str(len(ids)-1)
 run(port="80")

Why is it so long?
Unfortunately, this functionality doesn't seem to be built into Python.  I was tempted to use multiprocessing, but that didn't quite seem to be the right fit for what we're doing (letting a user open a program from anywhere).
So, I took the advice of a StackOverflow post I saw (I misplaced the link) and I implemented it using bottle. (I am open to new suggestions).
I used the Bottle library to run my own mini http server so all the different instances can communicate with each other. I suppose I could have used a socket, although I'm not convinced that would have reduced the byte count.
I have two seperate files, s and main.py.  s is short of server and because it appears in the code, I figured I should make the name as short as possible.
Communication Web Server's API
The web server only accepts POST requests and only responds to input inside the POST's body.
All requests go through / (or localhost/).
Valid input:

* in the post body will request for the server to return a new id to assign the client.
-<id> in the post body will remove the id from the active list of id's, decreasing all relevant id's and the total count.
An empty request in the post body will simply return an empty string.  This is what is used for testing to see if the server is online.

Closing the program
I implemented multi-threading so closing the program is as simple as pressing enter.
Opening the program
If you do not have Python setup correctly inside your environmental variables simply create a .bat file and put it in the same folder as main.py and s with the following code (if you installed Python for all users, it may be at a different location):
set PATH=%userprofile%\AppData\Local\Programs\Python\Python36
python main.py

Credits
From 694 to 691 bytes Adám.

Can't you remove :8080/?

If I were to assign the port to port 80, then yes; otherwise, no.  The default port for webbrowsers (and requests) is port 80, but I can remove the /.

@Adám I did update it with the port change, saved 1 byte that way.

sh + linux/unix tools, 128 bytes
if sleep supports floating point numbers
trap '(flock 9;grep -vw $$ p>t;mv t p)9>l' exit;(flock 9;echo $$>>p)9>l;f(){ echo $(sed -n /^$$\$/= p)/$(wc -l<p);sleep .1;f;};f

otherwise, 159 bytes
trap '(flock 9;grep -vw $$ p>t;mv t p)9>l' exit;(flock 9;echo $$>>p)9>l;perl -MTime::HiRes=usleep -nE/^$$'$/&&say("$./",$.+(@a=<>)),usleep 1e5,$.=-(@ARGV=p)' p

or sleep can be replaced with : (no-op), but it will make active waiting.

This is really close - "You must print only when the number of instances changes, and not at any other time."

@darrylyeo just fix, but was looking for shorter solution but didn't have the time, also to sleep 100ms, i have a solution but longer

Java 8, (199+301=) 500 bytes
M.jar: (the main program)
import javafx.collections.*;class M{static ObservableList o=FXCollections.observableArrayList();static int j,F;int i,f;{F=0;ListChangeListener e=(ListChangeListener.Change c)->{if(f<1)System.out.println((F>0&i>F?--i:i)+"/"+j);};o.addListener(e);o.add(i=++j);}public void f(){F=f=i;j--;o.remove(--i);}}

S.jar: (the server to control the program-flow)
import java.util.*;interface S{static void main(String[]a){List<M>l=new Stack();for(Scanner s=new Scanner(System.in);;){Float n=s.nextFloat();if(n%1==0)l.add(new M());else{int t=(int)(n*10-1);l.get(t).f();l.remove(t);}}}}

Explanation of the code:
import javafx.collections.*;
                  // Required import for ObservableList, FXCollections, and ListChangeListener
class M{          // Program-class
  static ObservableList o=FXCollections.observableArrayList();
                  //  Static list to keep record of all instances
  static int j,   //  Static integer (total number of instances)
             F;   //  Static flag (remove occurred?)
  int i,          //  Non-static integer (id of this instance)
      f;          //  Non-static flag (has been removed)
  {               //  Non-static initializer-block (shorter than constructor)
    F=0;          //   Reset the static flag remove_occurred, because we add a new instance
    o.addListener((ListChangeListener.Change c)->{
                  //   Add a change listener for the ObservableList
                  //   This will monitor any additions or removes on the List
       if(f<1)    //    If this instance is not removed yet:
         System.out.println(
                  //     Print:
           (F>0&i>F?
                  //      If a removed occurred and this id is larger than the removed instance
             --i  //       Decrease its id by 1 before printing it
            :     //      Else:
             i)   //       Just print its id
           +"/"+j);
                  //      Plus the total number of instances left
    });
    o.add(        //   Add anything to the Observable list to trigger the listener
     i=++j);      //    Increase the total amount of instances, and set the id of this instance to the last one
  }               //  End of non-static initializer-block
  public void f(){//  Finalize-method
    F=f=i;        //   Set both flags to the current id
    j--;          //   Decrease the total amount of instances
    o.remove(--i);//   Remove the current instance from the list to trigger the listener
  }               //  End of Finalize-method
}                 // End of Program-class

import java.util.*;
                  // Required import for List, Stack and Scanner
interface S{      // Server-class
  static void main(String[]a){
                  //  Mandatory main-method
    List<M>l=new Stack();
                  //   List of programs
    for(Scanner s=new Scanner(System.in);
                  //   Create a STDIN-listener for user input
        ;){       //   Loop indefinitely
      int t=s.nextInt();
                  //    Get the next integer inputted
      if(t<1)     //    If it's 0:
        l.add(new M());
                  //     Startup a new program, and add its instance to the list
      else{       //    Else:
        l.get(t).f();
                  //     Close the program with this integer as id
        l.remove(t);}
                  //     And remove it from the list of programs
    }             //   End of loop
  }               //  End of main-method
}                 // End of Server-class

General explanation:
All programs will keep a record of their own id; the total number of instances left; whether a remove occurred; and which programs have closed.
The server is just a wrapper-class to start and stop programs. When a user inputs 0, it will startup a new program. When the used inputs a positive integer (i.e. 2), it will close the program with that id. (Note: S.jar has M.jar as library to access it.)
Gif to see it in action:

Thoughts to golf it further:
I just noticed while writing the explanation that I only use the ObservableList for it's add/remove-ListChangeListener, and don't use its content at all. Removing this and using another type of static Listener might be shorter.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Frequency Distribution of Mixed Dice Rolls
A follow-up to this challenge
Given a set of mixed dice, output the frequency distribution of rolling all of them and summing the rolled numbers on each die.
For example, consider 1d12 + 1d8 (rolling 1 12-sided die and 1 8-sided die). The maximum and minimum rolls are 20 and 2, respectively, which is similar to rolling 2d10 (2 10-sided dice). However, 1d12 + 1d8 results in a flatter distribution than 2d10: [1, 2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 7, 6, 5, 4, 3, 2, 1] versus [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1].
Rules

The frequencies must be listed in increasing order of the sum to which the frequency corresponds.
Labeling the frequencies with the corresponding sums is allowed, but not required (since the sums can be inferred from the required order).
You do not have to handle inputs where the output exceeds the representable range of integers for your language.
Leading or trailing zeroes are not permitted. Only positive frequencies should appear in the output.
You may take the input in any reasonable format (list of dice ([6, 8, 8]), list of dice pairs ([[1, 6], [2, 8]]), etc.).
The frequencies must be normalized so that the GCD of the frequencies is 1 (e.g. [1, 2, 3, 2, 1] instead of [2, 4, 6, 4, 2]).
All dice will have at least one face (so a d1 is the minimum).
This is code-golf, so the shortest code (in bytes) wins. Standard loopholes are forbidden, as per usual.

Test Cases
These test cases are given as input: output, where the input is given as a list of pairs [a, b] representing a b-sided dice (so [3, 8] refers to 3d8, and [[1, 12], [1, 8]] refers to 1d12 + 1d8).
[[2, 10]]: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
[[1, 1], [1, 9]]: [1, 1, 1, 1, 1, 1, 1, 1, 1]
[[1, 12], [1, 8]]: [1, 2, 3, 4, 5, 6, 7, 8, 8, 8, 8, 8, 7, 6, 5, 4, 3, 2, 1]
[[2, 4], [3, 6]]: [1, 5, 15, 35, 68, 116, 177, 245, 311, 363, 392, 392, 363, 311, 245, 177, 116, 68, 35, 15, 5, 1]
[[1, 3], [2, 13]]: [1, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 37, 36, 33, 30, 27, 24, 21, 18, 15, 12, 9, 6, 3, 1]
[[1, 4], [2, 8], [2, 20]]: [1, 5, 15, 35, 69, 121, 195, 295, 423, 579, 761, 965, 1187, 1423, 1669, 1921, 2176, 2432, 2688, 2944, 3198, 3446, 3682, 3898, 4086, 4238, 4346, 4402, 4402, 4346, 4238, 4086, 3898, 3682, 3446, 3198, 2944, 2688, 2432, 2176, 1921, 1669, 1423, 1187, 965, 761, 579, 423, 295, 195, 121, 69, 35, 15, 5, 1]
[[1, 10], [1, 12], [1, 20], [1, 50]]: [1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 285, 360, 444, 536, 635, 740, 850, 964, 1081, 1200, 1319, 1436, 1550, 1660, 1765, 1864, 1956, 2040, 2115, 2180, 2235, 2280, 2316, 2344, 2365, 2380, 2390, 2396, 2399, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2399, 2396, 2390, 2380, 2365, 2344, 2316, 2280, 2235, 2180, 2115, 2040, 1956, 1864, 1765, 1660, 1550, 1436, 1319, 1200, 1081, 964, 850, 740, 635, 536, 444, 360, 285, 220, 165, 120, 84, 56, 35, 20, 10, 4, 1]

Sandbox

Jelly,  14  7 bytes
-3 bytes thanks to Mr. Xcoder (use of an implicit range to avoid leading R; replacement of reduce by the dyadic Cartesian product and flatten, p/F€, with the Cartesian product built-in for that very purpose, Œp.)
ŒpS€ĠL€

A monadic link taking a list of dice faces and returning the normalised distribution of the increasing sums.
Try it online!
How?
Goes through the list of dice "sizes" (implicitly) makes them into their list of faces, then gets the Cartesian product of those lists (all possible rolls of the set of dice), then sums up those rolls, gets the groups of equal indices (by ascending value) and takes the length of each group.
ŒpS€ĠL€ - Link: list of numbers, dice  e.g. [2,5,1,2]
Œp      - Cartisian product (implicit range-ification -> [[1,2],[1,2,3,4,5],[1],[1,2]])
        -                   -> [[1,1,1,1],[1,1,1,2],[1,2,1,1],[1,2,1,2],[1,3,1,1],[1,3,1,2],[1,4,1,1],[1,4,1,2],[1,5,1,1],[1,5,1,2],[2,1,1,1],[2,1,1,2],[2,2,1,1],[2,2,1,2],[2,3,1,1],[2,3,1,2],[2,4,1,1],[2,4,1,2],[2,5,1,1],[2,5,1,2]]
  S€    - sum €ach          -> [4,5,5,6,6,7,7,8,8,9,5,6,6,7,7,8,8,9,9,10]
    Ġ   - group indices     -> [[1],[2,3,11],[4,5,12,13],[6,7,14,15],[8,9,16,17],[10,18,19],[20]]
     L€ - length of €ach    -> [1,3,4,4,4,3,1]

Note: there is only ever one way to roll the minimum (by rolling a one on each and every dice) and we are not double-counting any rolls, so there is no need to perform a GCD normalisation.

Thanks, I'm wondering if we ever need the ÷g/$ though (isn't there always only one way to get the min or max?)

Thought this a worth-to-share alternative: ŒpS€µLƙ

Haskell, 54 bytes
1%r=r
n%r=zipWith(+)(r++[0,0..])$0:(n-1)%r
foldr(%)[1]

Try it online!

Haskell, 63 bytes
f l=[sum[1|t<-mapM(\x->[1..x])l,sum t==k]|k<-[length l..sum l]]

Try it online!

Haskell, 68 bytes
k%(h:t)=sum$map(%t)[k-h..k-1]
k%_=0^k^2
f l=map(%l)[length l..sum l]

Try it online!

MATL, 8 bytes
1i"@:gY+

The input is an array of (possibly repeated) die sizes.
Try it online! Or verify all test cases.
Explanation
1      % Push 1
i      % Input: numeric array
"      % For each k in that array
  @    %   Push k
  :    %   Range: gives [1 2 ... k]
  g    %   Convert to logical: gives [1 1 ... 1]
  Y+   %   Convolution, with full size
       % End (implicit). Display (implicit)

Husk, 7 bytes
mLkΣΠmḣ

Input is a list of dice.
Try it online!
Explanation
mLkΣΠmḣ  Implicit input, say x=[3,3,6].
     mḣ  Map range: [[1,2,3],[1,2,3],[1,2,3,4,5,6]]
    Π    Cartesian product: [[1,1,1],[1,1,2],..,[3,3,6]]
  kΣ     Classify by sum: [[[1,1,1]],[[1,1,2],[1,2,1],[2,1,1]],..,[[3,3,6]]]
mL       Map length: [1,3,6,8,9,9,8,6,3,1]

Octave, 88 69 58 56 bytes
As mentioned in the Haskell answer, this uses the fact that the distribution of e.g. a 3-sided and a 5-sided dice is the discrete convolution of the two vectors [1,1,1] and [1,1,1,1,1]. Thanks @LuisMendo for -11 bytes worth of clever golfing!
function y=f(c);y=1:c;if d=c(2:end);y=conv(~~y,f(d));end

Try it online!
This submission is using an recursive approach. But if you would use a loop it would be slightly longer:
function y=f(c);y=1;for k=cellfun(@(x)ones(1,x),c,'Un',0);y=conv(y,k{1});end

Mathematica, 44 bytes
Outputs the frequencies labeled with the corresponding sums
Tally@*Fold[Join@@Table[#+i,{i,#2}]&]@*Range

Try it online!
-5 bytes from Martin Ender
thanks to Misha Lavrov for letting me know that "labeled" is valid

Wolfram Language (Mathematica), 26 bytes
Tally[Tr/@Tuples@Range@#]&

Try it online!
A modification of my answer to the previous challenge. This just generates all possible outcomes, adds them up, and tallies the results.
For fun, we could write it as Tally@*Total@*Thread@*Tuples@*Range, but that's longer.
Wolfram Language (Mathematica), 41 bytes
CoefficientList[1##&@@((x^#-1)/(x-1)),x]&

Try it online!
This is the convolution-based approach (here, we take convolutions via the product of generating functions - 1+x+x^2+...+x^(N-1) is the generating function for rolling a dN - and then take the list of coefficients). I include it because the first solution isn't practical for large inputs.

Haskell, 80 78 64 bytes
This solution ended up being almost the same as the one of @Sherlock9 in the previous challenge with the maybe more natural approach. @xnor has an even shorter Haskell solution!
import Data.List
g x=[1..x]
map length.group.sort.map sum.mapM g

Explanation:
                              mapM g -- all possible outcomes
                      map sum        -- the sums of all possible outcomes
map length.group.sort                -- count the frequency of each sum

Try it online!
Previous solution:
This is using the @AndersKaseorg discrete convolution function. The observation here is that the distribution of e.g. a 3-sided and a 5-sided dice is the discrete convolution of the two vectors [1,1,1] and [1,1,1,1,1].
foldl1(#).map(`take`l)
(a:b)#c=zipWith(+)(0:b#c)$map(a*)c++[]#b
_#c=0<$c
l=1:l

Try it online!

Jelly, 14 bytes
R+Ð€/FċÐ€SR$ḟ0

Try it online!
Input is a list of die values. I could golf this down by stealing ĠL€ from the other Jelly answer but then I could also golf down the first half and end up with the same thing so I'll just leave it how it is

Pyth, 12 bytes
lM.gs.nk*FSM

Try it here!
How?

lM.gs.nk*FSM  ~ Full program.

          SM  ~ Map with inclusive unary integer range [1, N].
        *F    ~ Fold (Reduce by) Cartesian product.
  .g          ~ Group by function result.
    s.n       ~ The sum of the list when flattened.
lM            ~ Length of each group.

Python 2, 120 119 bytes
lambda v:[reduce(lambda a,c:sum([[b+y for b in a]for y in range(c)],[]),v,[0]).count(d)for d in range(sum(v)-len(v)+1)]

Try it online!
Thks for Mego/Jonathon Allan for 1 byte.

...i.e. save a byte.

05AB1E, 11 bytes
€L.«âOO{γ€g

Try it online!
How it works

€L.«âOO{γ€g - Full program.

€L          - For each N in the list, get [1 .. N].
  .«        - Fold a dyadic function between each element in a list from right to left.
    â       - And choose cartesian product as that function.
     O      - Flatten each.
      O     - Sum each.
       {γ   - Sort, and group into runs of equal adjacent values.
         €g - Get the lengths of each.

Saved 1 byte thanks to Emigna!

You could do O instead of €˜

R, 51 bytes
function(D){for(x in D)F=outer(F,1:x,"+")
table(F)}

Try it online!
Takes a list of dice and returns a named vector of frequencies; the names (values of the dice sums) are printed above the frequencies.
R, 59 bytes
function(D)table(Reduce(function(x,y)outer(x,1:y,"+"),D,0))

Try it online!
A Reduce approach rather than the iterative one above.
R, 62 bytes
function(D)Re(convolve(!!1:D,"if"(sum(x<-D[-1]),f(x),1),,"o"))

Try it online!
A convolution approach. It will give a few warnings that it's only using the first element of D for the expression 1:D but it doesn't affect the output. If we didn't have to take the Real part of the solution, it'd be 58 bytes.

Ruby, 72 bytes
->d{r=[0]*d.sum
[0].product(*d.map{|e|[*1..e]}){|e|r[e.sum-1]+=1}
r-[0]}

Try it online!
Takes a list of dice as input. No doubt it can be golfed down, but not too bad.

Pari/GP, 35 bytes
v->Vec(prod(i=1,#v,1/(1-x)%x^v[i]))

Try it online!

APL (Dyalog Classic), 12 10 bytes
-2 thanks to @Adám
⊢∘≢⌸+/↑,⍳⎕

Try it online!
the input ⎕ is a list of N dice
⍳⍵ is an N-dimensional array of nested vectors - all possible die throws
+/↑, flattens the arrays and sums the throws
⊢∘≢⌸ counts how many of each unique sum, listed in order of their first appearance, which fortunately coincides with their increasing order

-2: ⊢∘≢⌸+/↑,⍳⎕

JavaScript (ES6), 76 74 bytes
Takes input as a list of dice.
a=>(g=k=>a.map(d=>(s+=n%d|0,n/=d),s=0,n=k)|n?x:g(k+1,x[s]=-~x[s]))(0,x=[])

Test cases
Processing the last two test cases would require to enable TCO or increase the default stack size limit of the JS engine.

let f =

a=>(g=k=>a.map(d=>(s+=n%d|0,n/=d),s=0,n=k)|n?x:g(k+1,x[s]=-~x[s]))(0,x=[])

console.log(f([10,10]).join(', '))
console.log(f([1,9]).join(', '))
console.log(f([12,8]).join(', '))
console.log(f([4,4,6,6,6]).join(', '))
console.log(f([3,13,13]).join(', '))

Formatted and commented
NB: This is a commented version of my initial submission which was using reduce(). It's 2 bytes longer but easier to read.
a =>                    // given the list of dice a
  (g = k =>             // g = recursive function taking k = counter
    a.reduce((k, d) =>  //   for each die d in a:
      (                 //     k % d represents the current face of d
        s += k % d,     //     we add it to the total s
        k / d | 0       //     and we update k to pick the face of the next die
      ),                //     initialization:
      k,                //     start with the current value of k
      s = 0             //     total = 0
    ) ?                 //   reduce() returns 1 as soon as k = product of all dice
      x                 //     in which case we're done: stop recursion and return x
    :                   //   else:
      g(                //     do a recursive call to g() with:
        k + 1,          //       k incremented
        x[s] = -~x[s]   //       x[s] incremented
      )                 //     end of recursive call
  )(0, x = [])          // initial call to g() with k = 0 and x = empty array

Clojure, 96 bytes
#(sort-by key(frequencies(reduce(fn[R D](for[d(range D)r R](+ r d 1)))[0](mapcat repeat % %2))))

First input is a list of number of dice, and the second input is a list of number of sides on each dice.

Perl 5, 94 bytes
map$k{$_}++,map eval,glob join'+',map'{'.(join',',1..$_).'}',<>;say$k{$_}for sort{$a-$b}keys%k

Try it online!
Input format is a list of dice separated by newlines.  Thus, 1d10+2d8 would input as:
10
8
8

Clean, 154 142 136 107 100 85+13=98 bytes
Input is a list of dice.
\l#t=foldr(\a-> \b=[x+y\\x<-[1..a],y<-b])[0]l
=[length[v\\v<-t|u==v]\\u<-removeDup t]

Answer is in the form of a lambda.
+13 bytes from import StdEnv, which imports the module needed for this to work.
Try it online!

JavaScript (ES6), 83 bytes

f=(n,...a)=>n?f(...a).map((e,i)=>[...Array(n)].map(_=>r[i]=~~r[i++]+e),r=[])&&r:[1]
g=s=>o.textContent=f(...(s.match(/\d+/g)||[]).map(n=>+n)).join`, `
<input oninput=g(this.value)><p id=o>1

Takes input of each die as a separate parameter.

SageMath, 46 bytes
lambda*a:reduce(convolution,[x*[1]for x in a])

Try it online
This is an adaptation of my solution to the other challenge. It takes in any number of dice as parameters (e.g. f(4,4,6,6,6) for 2d4+3d6), and returns a list.

Python 2 + NumPy, 62 bytes
lambda*a:reduce(numpy.convolve,[x*[1]for x in a])
import numpy

Try it online!
As before, I've included this solution with the above one, since they're essentially equivalent. Note that this function returns a NumPy array and not a Python list, so the output looks a bit different if you print it.
numpy.ones(x) is the "correct" way to make an array for use with NumPy, and thus it could be used in place of [x*[1]], but it's unfortunately much longer.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Tell me when the next post is... WebSockets!
Background
I was working on a StackOverflow helper program (that sends me notifications) when I noticed something rather interesting in StackOverflow's Network tab:

StackOverflow uses WebSockets (not too surprising, but good to know)!  For this challenge, we will be conquering StackOverflow's web socket server.
This particular method could be transferred over to other domains related to StackExchange, but StackOverflow is very popular and a good example.  Feel free to lookup tags for other domains on StackExchange (feel free to connect to those instead, although I doubt it would reduce byte count since StackOverflow has id 1).
StackOverflow's Unofficial WebSocket API
There are two separate WebSocket servers you could use:

The secure, wss://qa.sockets.stackexchange.com/
Or the insecure, ws://qa.sockets.stackexchange.com/

Since we are code golfing and we aren't going to be sending any not-already-public-information, I suspect people will lean more toward the insecure option.
Next, in order to subscribe to our favorite tag, we need to send the following to the WebSocket to 'subscribe' to the tag's feed.
1-questions-newest-tag-javascript

You can replace javascript with any tag we're interested in.
The server will occasional send heartbeat requests.  You must reply with hb (so you can keep the connection alive).
A heartbeat requests looks as follows:
 {"action":"hb","data":"hb"}`

Here's a basic JavaScript-based socket (it may take a several minutes for there to be a new post, depending on time of day).  I used the most popular tag JavaScript to test with, but if you know of a more popular tag, go ahead and leave a comment.
Example:

var exampleSocket = new WebSocket("wss://qa.sockets.stackexchange.com/");
exampleSocket.onopen = function (event) {
  exampleSocket.send("1-questions-newest-tag-javascript");
};
exampleSocket.onmessage = function (event) {
  if (JSON.parse(event.data).data === "hb") {
    exampleSocket.send("hb")
  }
  console.log(event.data)
};

Specifications
Input: Any tag the user wants to receive updates about.
Output: Should be the first question (from when you connected to the WebSocket) and all consecutive available for said tag on StackOverflow.
Rules:

You must use WebSockets. Or, at least connect to sockets.stackexchange.com (including, ws://qa.sockets.stackexchange.com) and use it to receive updates for the inputted tag.  If you can find a better way of doing it (like not using the 1-questions-newest-tag-<tag> but still receive updates fo the inputted tag) by all means.  Or if you can write your own WebSocket equivalent in less bytes, even cooler.
Least number of bytes wins!

Language Compatibility
External libraries are encouraged. Many programming languages have a compatible library.

What is an acceptable output? Do we need to parse the response, and only show the markup in the data field?

@Carcigenicate You can print the whole thing or just parts of it.

So the raw JSON string is fine?

And is anything required between response prints? Do the responses need to be separated by a newline?

@Carcigenicate  No nothing is required to be done between the lines and the raw JSON string is fine.  As people have already submitted answers, I don't feel comfortable changing it.

The other answer also disregards the input requirement, so idk if it's really a factor.

@Carcigenicate I am okay with you outputting the JSON or outputting a subset of the JSON (like data). I don't think that would take up less bytes, but there may be something I'm missing.  Feel free to do it either way.

The two existing solutions seem incomplete in one regard: The server periodically sends a "heartbeat" ({"action":"hb","data":"hb"}) message, and if the client doesn't respond with hb, it gets disconnected. Should solutions be required to stay connected by responding to heartbeats?

@Jordan Oh, what data does the client have to send back when it get's a heartbeat?  I should update the post.  Yes they should stay connected.

In the browser the site responds with the text "hb".

@Jordan  Thanks and updated.

@Jordan Resolved.

+1 for the effort required to provide us with the unofficial api

Clojure with gniazdo, 126, 204, 203 bytes
+78 bytes to handle reacting to heartbeat messages
-1 byte by changing from indexing the string converted to a vector, to just using nth. I was expecting more of a gain from that :/
(use '[gniazdo.core])(fn[t](let[a(atom 0)s #(send-msg @a %)o(connect"ws://qa.sockets.stackexchange.com":on-receive #(if(=((vec %)11)\h)(s"hb")(println %)))](reset! a o)(s(str"1-questions-newest-tag-"t))))

An anonymous function that takes a string tag, and prints the raw JSON results as they're received, while responding to heartbeats.
To test if the received message is a heartbeat, I'm testing if the 12th character of the response is the character h. After looking over this page, it seems impossible for h to be the 12th character without the response being a heartbeat. If this isn't the case, I can try to figure out a workaround.
(ns bits.golf.web-sock
  (:require [gniazdo.core :as g]))

(defn new-tag-posts [^String tag]
  (let [; A mutable state to hold the sock.
        ; Necessary since the sock's callback requires a reference to the
        ;  sock itself
        sock-a (atom nil)

        ; Shortcut function to save bytes
        send #(g/send-msg @sock-a %)

        handler #(if (= (nth % 11) \h) ; If the 12th character (at index 11) is 'h'
                   (send "hb") ; respond to the heartbeat
                   (println %)) ; else print the JSON

        sock (g/connect "ws://qa.sockets.stackexchange.com"
                        :on-receive handler)]

    ; Set the mutable state to the created socket
    (reset! sock-a sock)

    ; Subscribe to the given tag
    (send (str "1-questions-newest-tag-" tag))))

Groovy, 388 without the @Grab
@Grab('org.java-websocket:Java-WebSocket:1.3.6')
import org.java_websocket.client.*;import org.java_websocket.handshake.*
new WebSocketClient(new URI("ws://qa.sockets.stackexchange.com/")){void onOpen(ServerHandshake h){send("1-questions-newest-tag-"+args[0]);}
void onClose(int c,String r,boolean b){}
void onMessage(String m){println(m);if(m.indexOf('"action":"hb"')>0){send('hb');}}
void onError(Exception e){}}.connect();
while(1){}

With the @Grab directive, run with groovy snippet.groovy javascript
Without the @grab directive, you have to download the library, and run groovy -cp Java-WebSocket-1.3.6.jar snippet.groovy javascript

Whether you choose the @Grab directive or the command line option, those bytes are part of your score. I think you could get away with giving the JAR a one-byte name, in which case -cp x  will only cost you 6 bytes.

Bash, 353 346 333 + 11 = 344 bytes
Builtins only, no coreutils. +11 bytes for -O extglob option.
The script contains unprintable characters, which are represented by e.g. <81> (a hex pair) or <CR> below. Also note there is a trailing space on lines 2 and 5. A full xxd dump follows..
Invoke like this:
$ bash -O extglob script.sh javascript

Output is on STDERR.
Note: This requires that your copy of bash was built with the --enable-net-redirections compile option. The default bash on OS X was not, but the version on Homebrew was (brew install bash && $(brew --prefix)/bin/bash ...).
exec</dev/tcp/qa.sockets.stackexchange.com/80>&0
p=printf\
$p"GET / HTTP/1.1
Host: x
Upgrade:
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Version: 13

"
r=read;$r;$r;$r;$r;$r
$p"<81>\\`$p%o $((${#1}+151))`\0\0\0\0001-questions-newest-tag-$1"
g()($p<81><82><01><01><01><01>ic
sleep 5
g);g&
h()($r -d} D
$p"${D##?@(~?|<7F>???????|)?}}">&2
h);h

xxd dump

<!--
00000000: 6578 6563 3c2f 6465 762f 7463 702f 7161  exec</dev/tcp/qa
00000010: 2e73 6f63 6b65 7473 2e73 7461 636b 6578  .sockets.stackex
00000020: 6368 616e 6765 2e63 6f6d 2f38 303e 2630  change.com/80>&0
00000030: 0a70 3d70 7269 6e74 665c 200a 2470 2247  .p=printf\ .$p"G
00000040: 4554 202f 2048 5454 502f 312e 310a 486f  ET / HTTP/1.1.Ho
00000050: 7374 3a20 780a 5570 6772 6164 653a 200a  st: x.Upgrade: .
00000060: 5365 632d 5765 6253 6f63 6b65 742d 4b65  Sec-WebSocket-Ke
00000070: 793a 2064 4768 6c49 484e 6862 5842 735a  y: dGhlIHNhbXBsZ
00000080: 5342 7562 3235 6a5a 513d 3d0a 5365 632d  SBub25jZQ==.Sec-
00000090: 5765 6253 6f63 6b65 742d 5665 7273 696f  WebSocket-Versio
000000a0: 6e3a 2031 330a 0a22 0a72 3d72 6561 643b  n: 13..".r=read;
000000b0: 2472 3b24 723b 2472 3b24 723b 2472 0a24  $r;$r;$r;$r;$r.$
000000c0: 7022 815c 5c60 2470 256f 2024 2828 247b  p".\\`$p%o $((${
000000d0: 2331 7d2b 3135 3129 2960 5c30 5c30 5c30  #1}+151))`\0\0\0
000000e0: 5c30 3030 312d 7175 6573 7469 6f6e 732d  \0001-questions-
000000f0: 6e65 7765 7374 2d74 6167 2d24 3122 0a67  newest-tag-$1".g
00000100: 2829 2824 7081 8201 0101 0169 630a 736c  ()($p......ic.sl
00000110: 6565 7020 350a 6729 3b67 260a 6828 2928  eep 5.g);g&.h()(
00000120: 2472 202d 647d 2044 0a24 7022 247b 4423  $r -d} D.$p"${D#
00000130: 233f 4028 7e3f 7c7f 3f3f 3f3f 3f3f 3f7c  #?@(~?|.???????|
00000140: 293f 7d7d 223e 2632 0a68 293b 68         )?}}">&2.h);h
-->


text:
The Missing Number - Version 2
Background:
This question is a remix of the one that I made previously on this forum. The only difference with this one is: the range is significantly larger, AND dynamic. Details below!
Also, I'm typing this question incredibly quickly, so if there are any grammatical errors, I do apologize and ask if anyone would edit the question to clear any vagueness. Nonetheless, the original question is posted here: The Missing Number Revised
Question:
Given a minimum bound M, a maximum bound N, and a String of randomly concatenated integers [min, max), min (M) to max (N) exclusive, there is a number missing in the sequence. Your job is to write a program that will calculate this missing number.
Doing this problem by hand on smaller Strings, such as examples 1 and 2 below are obviously very easy. Conversely, computing a missing number on incredibly large datasets involving three-digit, four-digit, or more numbers would be incredibly difficult. The idea behind this problem is to construct a program that will do this process FOR you.
Important Information:
One thing that appeared as rather confusing when I posted this problem last night was: what exactly a missing number is defined as. A missing number is the number INSIDE of the range specified above; NOT necessarily the digit. In example 3, you will see that the missing number is 7, even though it appears in the sequence. There are 3 places the DIGIT 7 will appear in a series of [0, 30): “7”, “17”, and “27”. Your objective is to differentiate between these, and discover that 7 is the missing NUMBER (inside of example 3). In other words, the tricky part lies in finding out which sequences of digits are complete and which belong to other numbers.
Another very important factor in this: there are some input situations where there are multiple solutions! Your job will be to print out ALL numbers that are missing in the sequence. I cannot provide insight as to WHY they have multiple solutions; I only know they may exist.
Input:
The input is a single Integer T: the amount of test cases.
For each test case, there is an Integer M: the minimum number in the sequence, another Integer N: the maximum number in the sequence (thus M < N at ALL times), a String S, containing integers from M to N - 1 inclusive, or M to N exclusive (in other words, [M, N)). These integers, as stated above, are scrambled up to create a random sequence. There are NO delimiters (“42, 31, 23, 44”), or padding 0’s (003076244029002); the problems are exactly as described in the examples.
As stated above, M is ALWAYS lower than N, and the maximum range of numbers is < 100,000. |N - M|.
Winning Criteria:
Whoever has the fastest, and lowest memory usage will be the winner. In the miraculous event that a time ties, lower memory will be used for the time breaker. Please list Big O if you can!
Examples:
(Examples 1-6 are just for demonstration. Your program needn't to handle them.)
Here is a pastebin link of the examples.
TEST DATA
Please keep in mind the way you're to read in the data: Digit D represents how MANY test cases there are, the next lines will follow with integers M and N, then String S. I just wanted to clear it up. I also apologize for the incredibly large pastebin. Good luck!
Data: Test Data - Github repository

Do we need to take input from a file, or is STDIN acceptable?

@Ourous I figured it would be easier to read in the test data from a file, but if you want to do standard input, it’s acceptable.

I was looking at example 108-7-13129514-120-11-14134, and it seems to be missing a lot more than -15... Am I am misinterpreting the problem?

You can just use the sandbox...

With negative numbers the task is quite different from previous challenge ... but without the '-' symbol is would be more difficult

Input format is overly specific. Why not just take M, N and S, like the previous challenge (and most of the other challenges nowadays)?

@Uriel You can do that; I was wanting to be as specific as possible.

Clean -  Complexity Unknown
Currently works, explanation and further optimization in progress
module main
import StdEnv, StdLib, System.IO

:: Position :== [Int]
:: Positions :== [Position]
:: Digit :== (Char, Int)
:: Digits :== [Digit]
:: Number :== ([Char], Positions)
:: Numbers :== [Number]
:: Complete :== (Numbers, Positions)

decouple =: snd o unzip

//lcouple :: (.a -> .b) (.a, .c) -> (.b, .c)
lcouple fn (arg, oth) :== (fn arg, oth)

getCases :: Int *World -> ([(String, [[Char]])], *World)
getCases n world
    # (range, world)
        = evalIO getLine world
    # range
        = fromString range
    # spacePos
        = elemIndex ' ' range
    | isNothing spacePos
        = abort "invalid input, expected space in range\n"
    # (a, b)
        = splitAt (fromJust spacePos) range
    # (a, b)
        = (toInt (toString a), toInt (toString (tl b)))
    # numbers
        = [(fromString o toString) number \\ number <- [a..(b-1)]]
    # (string, world)
        = evalIO getLine world
    | n > 1
        # (cases, world)
            = getCases (n - 1) world
        = ([(string, numbers) : cases], world)
    = ([(string, numbers)], world)

singletonSieve :: Complete -> Complete
singletonSieve (list, sequence)
    | sequence_ == sequence
        = reverseSieve (list, sequence)
    = (list_, sequence_)
where
    singles :: Positions
    singles
        = [hd pos \\ (_, pos) <- list | length pos == 1]
    list_ :: Numbers
    list_
        = map (app2 (id, filter notInOtherSingle)) list
    where
        notInOtherSingle :: Position -> Bool
        notInOtherSingle pos
            = not (isAnyMember pos (flatten (filter ((<>) pos) singles)))
    sequence_ :: Positions
    sequence_
        = foldr splitSequence sequence singles

reverseSieve :: Complete -> Complete
reverseSieve (list, sequence)
    | sequence_ == sequence
        = (list, sequence)
    = (list_, sequence_)
where
    singles :: Positions
    singles
        = [hd pos \\ pos <- [[subSeq \\ subSeq <- sequence | isMember subSeq p] \\ (_, p) <- list] | length pos == 1]
        //= [hd pos \\ pos <- | length pos == 1]
    list_ :: Numbers
    list_
        = map (app2 (id, filter (\b_ = (notInOtherSingle b_) && (hasContiguousRun b_)))) list
    where
        notInOtherSingle :: Position -> Bool
        notInOtherSingle pos
            = not (isAnyMember pos (flatten (filter ((<>) pos) singles)))
        hasContiguousRun :: Position -> Bool
        hasContiguousRun pos
            //= any (any (isPrefixOf pos) o tails) sequence_
            = and [isMember p (flatten sequence_) \\ p <- pos]

    sequence_ :: Positions
    sequence_
        = foldr splitSequence sequence singles

splitSequence :: Position Positions -> Positions
splitSequence split sequence
    = flatten (map newSplit (map (span (not o ((flip isMember) split))) sequence))
where
    newSplit :: (Position, Position) -> Positions
    newSplit ([], b)
        # b
            = drop (length split) b
        | b > []
            = [b]
        = []
    newSplit (a, b)
        # b
            = drop (length split) b
        | b > []
            = [a, b]
        = [a]

indexSubSeq :: [Char] Digits -> Positions
indexSubSeq _ []
    = []
indexSubSeq a b
    # remainder
        = indexSubSeq a (tl b)
    | isPrefixOf a (map fst b)
        = [[i \\ (_, i) <- take (length a) b] : remainder]
        //= [[i \\ _ <- a & (_, i) <- b] : remainder]
    = remainder

missingNumber :: String [[Char]] -> [[Char]]
missingNumber string numbers
    # string
        = [(c, i) \\ c <-: string & i <- [0..]]
    # locations
        = [(number, indexSubSeq number string) \\ number <- numbers]
    # digits
        = [length (indexSubSeq [digit] [(c, i) \\ c <- (flatten numbers) & i <- [0..]]) \\ digit <-: "0123456789-"]
    # missing
        = flatten [repeatn (n - length i) c \\ n <- digits & (c, i) <- [(digit, indexSubSeq [digit] string) \\ digit <-: "0123456789-"]]
    # (answers, _)
        = until (\e = e == singletonSieve e || length [(a, b) \\ (a, b) <- fst e | length b == 0 && isMember a (candidates missing)] > 0) singletonSieve (locations, [indexList string])
    # answers
        = filter (\(_, i) = length i == 0) answers
    = filter ((flip isMember)(candidates missing)) ((fst o unzip) answers)
where
    candidates :: [Char] -> [[Char]]
    candidates chars
        = moreCandidates chars []
    where
        moreCandidates :: [Char] [[Char]] -> [[Char]]
        moreCandidates [] nums
            = removeDup (filter (\num = isMember num numbers) nums)
        moreCandidates chars []
            = flatten [moreCandidates (removeAt i chars) [[c]] \\ c <- chars & i <- [0..]]
        moreCandidates chars nums
            = flatten [flatten [moreCandidates (removeAt i chars) [ [c : num] \\ num <- nums ]] \\  c <- chars & i <- [0..]]

Start world
    # (number, world)
        = evalIO getLine world
    # (cases, world)
        = getCases (toInt number) world
    =  flatlines[flatten(intersperse [', '] (missingNumber string numbers)) \\ (string, numbers) <- cases]

Try it online!

C++: A naive brute-force solution
Try to split the string in any possible way where all number are within the range and do not repeat. If there is only one number missing, add it to the set of answers.
While I tried to optimise the code, I did not put any heuristics or optimisations to the algorithm. The solution is so slow, that it can only handle the 1st and the 3rd test case. It can be used as a baseline when comparing "speed" and to show how a better algorithm implemented in a slower language can beat a worse solution in a faster language.
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>

class missing_number_solver
{
	static constexpr int max_digit_len = 6;

	long int n, m;
	std::vector<long int> digits;

	std::vector<long int> used;
	long int used_count = 0;

	std::set<long int> results;

	void f(size_t pos)
	{
		if (pos == digits.size())
		{
			if (used_count == m - n - 1)
			{
				auto idx = std::find(used.begin(), used.end(), false) - used.begin();
				results.insert(n + idx);
			}
			return;
		}

		bool negate = false;
		if (digits[pos] < 0)
		{
			negate = true;
			pos++;
		}

		long int acc = 0;
		for (int i = 0; i < max_digit_len && pos + i < digits.size(); i++)
		{
			if (digits[pos + i] < 0)
			{
				// Minus sign. Stop.
				break;
			}

			acc = 10 * acc + digits[pos + i];
			auto number = negate ? -acc : acc;

			if (number < n || number >= m)
			{
				continue;
			}
			if (used[number - n])
			{
				continue;
			}

			used[number - n] = true;
			used_count++;

			f(pos + i + 1);

			used[number - n] = false;
			used_count--;

			if (i == 0 && digits[pos] == 0)
			{
				// Leading zero. Do not consume more digits.
				break;
			}
		}
	}

public:
	missing_number_solver(long int n, long int m, std::string str) :
			n(n), m(m)
	{
		for (char c : str)
		{
			digits.push_back(c == '-' ? -1 : c - '0');
		}
	}

	std::set<long int> solve()
	{
		used = std::vector<long int>(m - n, false);
		f(0);
		return results;
	}
};

int main()
{
	int t;

	std::cin >> t;

	for (int i = 0; i < t; i++)
	{
		long int n, m;
		std::string s;

		std::cin >> n >> m;
		std::cin >> s;

		auto results = missing_number_solver(n, m, s).solve();

		for (auto result : results)
		{
			std::cout << result << ' ';
		}
		std::cout << std::endl;
	}
}

Try it online!
In addition, this is how a test case with multiple solutions looks like:
1 22
1212345678910111314151617181920

As I understand, the output should be:
12 21

as the original sequence must be one of:
[1, 2, 12, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20] # missing 21
[1, 21, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20] # missing 12
[12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20] # missing 21

JavaScript (ES6)
Quite slow, but I think it can solve the test cases.
Not all test cases present at the moment, I'll try to put all of them later.

Time=fun=>{
  var t0 = performance.now(), t1=t0, t2
  console.log(fun(msg=>console.log(msg, (t2=t1,t1=performance.now(),t1-t2))))
  var t = performance.now()-t0
  return t<1e3 ? t+' ms':t/1000+' sec'
}

function Missing(str, ll,hl)
{
  var can, seq, num, i1, i2, s1, s2

  var rec = span =>
  {
    var num
    if (!seq[span]) return 1
    if (seq[span] == '_') ++span
    if (seq[span] == '-')
    {
      ++span
      num = -seq[span++]
      while (num < hl && num >= ll)
      {
        if (!values[num])
        {
          values[num] = 1
          if (rec(span)) return 1
          values[num] = 0
        }
        if (!num) return;
        if (seq[span] == '_' || seq[span] == '-') return;
        num = -seq[span++] +num*10
      }
    }
    else
    {
      num = +seq[span++]

      while (num < hl && num >= ll)
      {
        if (!values[num])
        {
          values[num] = 1
          if (rec(span)) return 1
          values[num] = 0
        }
        if (!num) return;
        if (seq[span] == '_' || seq[span] == '-') return;
        num = +seq[span++] +num*10
      }
    }
  }

  find=num=>{
    var i1,i2
    if (num < 0)
    {
      i1 = seq.indexOf(num)
      if (i1<0) return i1
      i2 = seq.lastIndexOf(num)
      return i2 == i1 ? i1 : -1;
    }
    else
    {
      // take care of false positives when there is a '-' before the number
      // so much slower respect to the other branch
      var rx = new RegExp('[^-]'+num)
      i1 = (' '+seq).search(rx)
      if (i1 < 0) return i1
      i2 = seq.slice(i1).search(rx)
      return i2 < 0 ? i1 : -1;
    }
  }

  for (can = ll; can < hl; ++can)
  {
    if (str.indexOf(can) < 0) return can;
    values = {}
    values[can] = 1
    seq = str
    for (num = ll; num < hl; ++num)
    {
      if (!values[num])
      {
        i1 = find(num)
        if (i1 >= 0)
        {
          i2 = i1+(''+num).length
          if (seq[i1-1] == '_') --i1;
          if (seq[i2] == '_') ++i2;
          s1 = seq.slice(0,i1), s2 = seq.slice(i2)
          seq = s1 ? s2 ? s1+'_'+s2 : s1 : s2
          values[num] = 1
          num = ll-1
        }
      }
    }
    // console.log('REC',can,seq)
    if (rec(0)) return can
  }

}

Test = [["229272120623131992528240518810426223161211471711",0,30],
["11395591741893085201244471432361149120556162127165124233106210135320813701207315110246262072142253419410247129611737243218190203156364518617019864222241772384813041175126193134141008211877147192451101968789181153241861671712710899168232150138131195104411520078178584419739178522066640145139388863199146248518022492149187962968112157173132551631441367921221229161208324623423922615218321511111211121975723721911614865611197515810239015418422813742128176166949324015823124214033541416719143625021276351260183210916421672722015510117218224913320919223553222021036912321791591225112512304920418584216981883128105227213107223142169741601798025",0,250],
["1342319526198176611201701741948297621621214122224383105148103846820718319098731271611601912137231471099223812820157162671720663139410066179891663131117186249133125172622813593129302325881203242806043154161082051916986441859042111711241041590221248711516546521992257224020174102234138991752117924457143653945184113781031116471120421331506424717816813220023315511422019520918114070163152106248236222396919620277541101222101232171732231122301511263822375920856142187182152451585137352921848164219492411071228936130762461191564196185114910118922611881888513917712153146227193235347537229322521516718014542248813617191531972142714505519240144",0,250],
["80901062173445953196186301456692487427529429993285787069831233591227347952858217788973393434655233831877642815971961376506739541125150847218402660459824663618793744638964202557497582411568",0,100],
["1302797101187197126231292239133232171515415180252611104191857114450179111134201662662932221381232833721819553193151235255288382951611921896841051718124164119345781124629128526219276169113296142414667176120182159236229724224516532275167119911243329243153024688191841282382655120729228164986223079108216327276103148145142108302692092566328429021116692173174253143279251205351277329821214010060691392141981836583611522942572022622786840551472342675428024419426414125827112277297170168186160110274722278115694901142861021820190220247252137158289448121233277249250155149270135481781852131754322187701628221622313210925442210224106118208268228260259299563117313621524812441579558157591322615020323724028718891772125199273808916247116862811074974204225999613626323152211312397519621734172206200",0,300],
["201-1382843613319717171212-193-175-591897023633-61234-11828-6108969023295-104-18916914-36-893-23126175-85-9611811654113-158-198208-250126-95143166-65160215-70-44-202-194158-16324475-2011514516537-90-358511742-211-97-139162219-29221-18135-12-60-22516-222-312288-217-102137-2092095274-190-87249-105-249157-6916430-116-15360225100-178-218-129-141248-111-224220224159237-128-137-79-38-18798-51-238-173-203109532429200223625180188-226112-142216-242150-1231038-228-887379154-210101130-5323115199-15623180-20710425-245-186-147102-247240233194168-112228148592144964-149-100-52193129152-34-1134043128123-172110-6363144-21922746-151-174-140-19299-206161-12268141-214-805067206-46-5195-237-5813-40-130-170122-229-16558213-184-47174-161190-13487115-115-23-235-143-201078382222-57-67205-18-81-427278-179-11-162-244-86-83-8421-11927-120204-71-50138-136-1991359165-126173-76448-62206229-99179-164-110-220-146-17697-22376146-49184-236-37-91-43-419671127-54-23269-480-451313817023821721015322617613-3224286-182186-144-233-216-24016313977-98-230192155-101182183-14889-19714018581-166-114-1502189-27-212-17-92121-1-23918732-132-215-205-21-33-15961-1275-15-196-39-56-154-243-6820256-89191239145-191178-55-208-9347-16-41-221-152-2839-18310-241-117-169-75-103-73-16716744241-248125-64119-30120-94-177-234-195-13-21324734198-14571569255-26149-107-13111-121-125-171-77-204-157-25-168-66127-19-200172-78105147-7213212466177-155-135-185-24-109181230-227-7424619-106142111-246-22074111494-7-160-9106-10-133-18024531-145211-124-3-188-82136-22235-10818203134",-250,250],
["-615-631-765-659-699-748-714-554-451-569-898-462-676-721-459-578-522-493-668-686-728-603-455-587-815-537-492-639-842-485-747-832-768-899-471-900-893-598-626-757-682-501-620-614-549-770-824-527-539-755-596-452-821-591-572-857-895-776-836-503-773-590-575-568-633-737-702-514-510-724-592-739-790-846-732-536-579-775-479-688-687-740-794-650-637-636-518-791-611-473-497-675-758-697-548-655-559-534-736-677-860-543-733-723-805-831-670-608-883-502-600-583-467-867-613-612-621-861-731-866-793-460-798-505-595-771-769-486-718-570-813-749-685-496-630-819-886-785-870-807-516-744-680-653-719-859-717-681-880-476-674-582-667-489-865-876-695-495-703-841-707-711-777-760-848-837-517-532-784-465-693-894-520-678-862-818-487-743-782-597-477-562-519-586-839-700-538-710-566-746-565-546-466-456-811-599-822-772-602-480-810-494-751-550-640-665-508-809-581-840-560-863-526-454-725-683-632-660-729-594-457-753-759-816-609-706-800-891-877-617-628-715-651-833-547-558-817-734-698-735-647-762-589-855-541-774-792-875-838-574-652-864-482-673-619-799-780-851-783-666-644-742-812-872-641-622-662-535-814-803-856-720-722-498-826-500-524-858-897-512-490-610-808-529-694-528-506-804-701-761-561-679-634-834-738-545-712-605-623-878-588-882-513-461-828-624-509-854-616-823-458-472-705-488-767-556-523-533-779-829-654-849-464-830-499-763-504-585-580-852-730-474-657-557-692-727-801-825-844-542-661-892-820-656-704-835-563-672-690-709-750-689-766-604-553-551-868-577-726-478-663-642-752-463-745-716-483-481-696-671-869-625-618-564-881-648-573-691-606-786-843-788-827-797-888-795-874-584-796-787-778-806-847-593-507-764-879-635-889-521-887-511-713-884-754-873-470-601-646-552-530-845-525-567-627-491-629-669-741-469-484-571-853-850-453-576-708-871-789-885-658-664-643-802-515-684-540-555-896-756-607-638-645-531-468-475-649-781-890",-900, -450],
["183205152228238-164156229248-187-189-207-112-128134-245231568-246-4760213-7266-1961240-141199233138-226-12421763-159125-208239-195225146-51-45105-24794-126-165-37-1456-40143109-75-222-116-70165110-214-11151-127-17411923779-864-720-2031573215875-65190-27187191878218613723286-218176-34-90-123182-153-38218-7618-173-205227198-25010710624430148-25-198-14824778-239-215597-21749206-121-1681627711456-35-101-18201-235-88-19124171200-194-78-125-138127216168-248174128153181-41299117811-146-171212850-20615021-1301189-69-152-117-23422367-43-6823-23273140-231195-220-44-197-211-64219121185-134-96-2217076-58-107-80222117-14-119-111111-102-7735197169-99-1324817326-163-223113-240-190-7917513957-154-103-66101126-298149145-1764351-28-2291372-135-202-118-175188-42-161975216153-109210172-862202653992132-85-1-1391099-738962-56103-180-97154-131-249-105-93-53-5550-89160-160204-104-114-3946-6374-170-17-18520398-59-36-177-94-238-2345-219177-243-15755-82-20115-149108-200-31-71135220234142844104-1934061-32236-166-6081-137-156180-1675436-182-9270179192-221-20180-120124-2372237-8716243-147-1692731-21-224-83-136-67-199214-49-241235224-212-233-16-210226167195833171-84245-11341-614488-19213014-10619612316312-74211-129133-10813169-155-41-144-133-183-98193-213-57958325-12164-24-230-54-50-142-244-30141249-122-2155-204215-942152990-91194-95100-11017-5-1812893-186-1396-242-140-179-188-236-151-228-216-2093-3147-11511224-48-62207-162-15024634-26-15813647120116208-100-19209242221-178-15-184-33-81159230-172-227-52-61184-225-461024418938122166-143",-250,250],
]

function go() {
  var t, i = 0;
  var Solve = _ => {
    var [s,a,b] = Test[i++]
    console.log(a,b,s)
    setTimeout(_=> {
      t = Time(_ => Missing(s,a,b));
      console.log('Solved in',t);
      if (Test[i]) setTimeout(Solve, 100);
    }, 100)
  }
  setTimeout(Solve, 100)
}
<button onclick="go()" >Test</button>Expect a total time of less than 3 minutes for all test cases in chrome


text:
Calculate the Upper Divmod
Task
Given two positive integers (dividend and divisor), calculate the quotient and the remainder.
Normally it would be calculated as e = o*q+r where q*o<=e and 0<=r<o.
For this challenge it still e = o*q+r but q*o>=e and -o<r<=0.
For example e=20 and o=3, normally it would be 20/3 -> 20=3*6+2, since 18<=20 and 0<=2<3. Here it will be 20/3 -> 20=3*7-1 where 21>=20 and -3<-1<=0
Test Cases
Input -> Output
20, 3 -> 7, -1
10, 5 -> 2, 0
7, 20 -> 1, -13
100, 13 -> 8, -4

You don't need to handle o=0.

Called it on being a trivial variant of regular divmod.

Is it acceptable to output r as the negation of the real r for languages that uses unsigned bytes to store data or assume overflowing? (-1 → 1 / 255)

@Uriel yes, but add a note about this on the answer

Python 3,  39 26 bytes
Martin Ender saved 13 bytes
lambda x,y:(-(x//-y),x%-y)

Try it online!
Python 2, 25 bytes
lambda x,y:(-(x/-y),x%-y)

Try it online!

I think you can just do x%-y to get the remainder.

Actually, why not go all the way... (-(x//-y),x%-y)

@MartinEnder Thats really good

@Mr.Xcoder Included both

Jelly, 3 bytes
NdN

Try it online!
How it works
Abusing divmod again \o/. Look ma’ no unicode!

NdN - Full program / Dyadic chain. | Example: 7, 20

N   - Negate the first input.      | -7
 d  - Divmod by the second one.    | [-1, 13]
  N - Negate each again.           | [1, -13]

Haskell, 25 bytes
n#k=[-div(-n)k,mod n(-k)]

Try it online!

Mathematica, 21 bytes
{s=⌈#/#2⌉,#-#2s}&

Try it online!

Can you add an explanation, please?

@Rod ⌈#/#2⌉ calculates the ceiling of their division, and stores it in a variable s, and then subtracts argument 2 * s from argument 1.

@Mr.Xcoder you are fast!

05AB1E, 4 bytes
(s‰(

Try it online!
5 bytes
(‰ćÄJ

Try it online!
How they work
Abuses Python's modulo! \o/

(s‰(  | Full program. Let A and B be the two inputs. | Example: 100, 13.

(     | Compute -A.                                  | -100
 s    | Swap (reverse the stack, in this case).      | 13, -100
  ‰   | Divmod.                                      | [-8, 4]
   (  | Negative (multiply each by -1, basically).   | [8, -4]

----------------------------------------------------

(‰ćÄJ | Full program. Takes input in reverse order.

(     | Negative. Push -A.
 ‰    | Divmod
  ć   | Push head extracted divmod (make the stack [quotient, [remainder]].
   Ä  | Absolute value (operates on the quotient).
    J | Join the stack.

Ah yes, forgot that the divmod works with negative numbers :)

And also, that's new functionality of J isn't it?. Never seen that before. Could definitely be useful.

@Emigna It is described as Join. Push ''.join(a) if a is list; Else, push ''.join(stack). I think it is the new functionality, although I haven't ever used J before :P

It's definitely new. Tried on my local version from August and 5)6 gives ['5']6 :)

Alice, 15 bytes
/O.
\io/R%e,R:R

Try it online!
Explanation
Ruby's integer division and modulo (on which Alice's are implemented) are defined such that using a negative divisor already sort of does what we want. If we negated the divisor we automatically get the correct modulo, and we get minus the quotient we want. So the easiest way to solve this is by negating a bunch of numbers:
/   Switch to Ordinal mode.
i   Read all input as a string "e o".
.   Duplicate the string.
/   Switch to Cardinal mode.
R   Implicitly convert the top string to the two integer values it
    contains and negate o.
%   Compute e%-o.
e,  Swap the remainder with the other copy of the input string. We can't
    use the usual ~ for swapping because that would convert the string
    to the two numbers first and we'd swap e%-o in between e and o instead
    of to the bottom of the string.
R   Negate o again.
:   Compute e/-o.
R   Negate the result again.
\   Switch to Ordinal mode.
O   Output -(e/-o) with a trailing linefeed.
o   Output e%-o.

    The code now bounces through the code for a while, not doing much except
    printing a trailing linefeed when hitting O again. Eventually, the IP
    reaches : and attempts a division by zero which terminates the program.

Pari/GP, 18 bytes
x->y->-[-x\y,-x%y]

Try it online!

MATL, 5 4 bytes
_&\_

Try it online!
-1 byte thanks to Luis Mendo
      # implicit input
_     # unary minus (negates first input, o)
&\    # alternative output mod, returns remainder, quotient, implicitly takes e
_     # unary minus, takes the opposite of the quotient.
      # implicit output, prints stack as remainder
                                         quotient

Julia, 18 bytes
x$y=.-fldmod(-x,y)

Try it online!
.- is element wise negation, and fldmod returns a tuple made of the results of floored divison and corresponding residue.

JavaScript (ES6), 37 31 29 27 25 bytes
Saved 2 bytes thanks to @Rod
Saved 2 bytes thanks to @ETHproductions
Takes input in currying syntax. Returns [q,r].
a=>b=>[q=~-a/b+1|0,a-q*b]

Test cases

let f =

a=>b=>[q=~-a/b+1|0,a-q*b]

console.log(JSON.stringify(f(20)(3)))   // -> 7, -1
console.log(JSON.stringify(f(10)(5)))   // -> 2, 0
console.log(JSON.stringify(f(7)(20)))   // -> 1, -13
console.log(JSON.stringify(f(100)(13))) // -> 8, -4

You can probably q=(a+b-1)/b+|0 instead q=a/b+.9|0

@ETHproductions Sounds like a plan. ;)

J, 16 bytes
([-]*a),~a=.>.@%

This is essentially the Jenny_mathy's Mathematica solution rewritten in J.
How it works:
a=.>.@% Finds the ceiling of the division of the left and right arguments and stores it into variable a
,~  concatenated to (reversed)
([-]*a) subtracts a*right argument from the left argument
Try it online!

R, 31 29 bytes
-2 bytes thanks to Giuseppe
function(e,o)-c(e%/%-o,-e%%o)

Try it online!

I think you can do a 29 byter with -c(e%/%-o,-e%%o)

Common Lisp, 7 bytes
Built-in function ceiling returns two values: the ceiling of the quotient, and the remainder to match:
$ clisp -q
[1]> (ceiling 20 7)
3 ;
-1

4, 55 50 bytes
3.711712114001231311141130013513213131211513115154

Try it online!
Represents the reminder by it's negation (10 instead of -10), since the language uses byte input and output, deemed valid by OP comment.

Perl 5, 30 + 1 (-p) = 31 bytes
say+($_-($\=$_%-($"=<>)))/$"}{

Try it online!

Commentator, 90 bytes
//
;{- -}
{-{-//-}e#<!-}
;{-{-{- -}-}-}
{-{-{-e#-}
;{-{- -}-}
{-%e#*/-}#          /*-}e#*/

Try it online!
Outputs the remainder, then the quotient, newline separated.

C (gcc), 43 bytes
f(x,y,z)int*x;{for(z=0;*x>0;*x-=y)z++;y=z;}

Usage
main(){
    int a=7,b=20,c;
    c=f(&a,b);
    printf("%d %d\n",c,a);
}

Try it online!

Java (OpenJDK 8), 30 bytes
(i,j)->(i+j-1)/j+","+(i%j-j)%j

Try it online!
7,-1
2,0
1,-13
8,-4

Add++, 35 bytes
L*,@0$_$2D2D%V/1B]b\GLVB]-1Gx$pBcB*

Try it online!

Deorst, 23 bytes
@l0-%z]@l0-,l0-@l0-miE_

Try it online!
How it works
@                       - Swap the inputs
 l0-                    - Negate
    %                   - Modulo
     z]                 - Push the inputs
       @                - Swap
        l0-             - Negate
           ,            - Integer divide
            l0-         - Negate
               @        - Swap
                l0-     - Negate
                   miE_ - Print

C (gcc) 41 bytes
f(a,b){b=(a+b-1)/b;}g(a,b){b=a-f(a,b)*b;}

This may be cheating, using two functions and it may fail other tests?
Try it online

SNOBOL4 (CSNOBOL4), 124 123 105 bytes
 E =INPUT
 O =INPUT
 Q =E / O
 R =E - Q * O
 EQ(0,R) :S(A)
 R =R - O
 Q =Q + 1
A OUTPUT =Q
 OUTPUT =R
END

Try it online!
Takes input as E, then O, separated by a newline and prints out Q, then R, separated by a newline.

Swift, 47 bytes
func f(a:Int,b:Int){print((a+b-1)/b,(a%b-b)%b)}

TXR: 8 bytes
Built-in function ceil-rem. E.g. (ceil-rem 20 7) yields (7 -1).

Clean, 42 bytes
import StdEnv
f a b#c=(a-1)/b+1
=(c,a-c*b)

Try it online!


text:
Advent Challenge 8: Storage Cart Transport Planning!
<< Prev
Thanks to the PPCG community, Santa now has balanced his storage carts. Now, he needs to move them into the transport docks so that they can be sent to the loading bays. Unfortunately, the tracks to move the carts around are a mess, and he needs to figure out how to get them all around without them crashing together!
Challenge
You will be given the tracks for each of the carts as lists of "labels" (or stations). The carts must be moved such that at any time frame, no two carts are on the same label/station. Essentially, the carts move between positions that each have a unique label.
Task
Given the tracks for each of the carts as a list of lists of labels (which are all positive integers), determine when each cart should be released in order to send all the carts to their destinations safely in the shortest time possible.
Here's an explanation of how the entire track system works. Let's say cart i is released at time t_i onto a track with labels T_i_1, T_i_2, ..., T_i_n. Then, during t_1 to t_i-1, cart i is not on the grid and can be ignored.
At time frame t_i, the cart is on label T_i_1, and for each time frame t_k from t_i to t_i+n (half-inclusive), the cart is on label T_i_k+1.
For all time frames after and including t_i+n, the cart is at its destination and is no longer on the grid.
The total amount of time t_T taken is the last time frame with a cart still on a track in the system.
Specifications
Given a track system, return a list of time frames [t_1, t_2, ..., t_n] where the ith cart starts at time t_i, such that no other arrangement would allow the carts to safely get to their destinations with a lesser total amount of time.
In terms of "safely", if at any time frame from t_1 to t_T there is more than one cart on any label, then they collide and the arrangement was not "safe". Note that two carts can move from a, b to b, a and still be "safe" because the tracks are 2-way.
Formatting Specifications
Input will be given as a matrix of positive integers in any reasonable format. Output should be given as a list of positive integers in any reasonable format. You may give output in zero-indexed time frames, so then the output would be a list of non-negative integers in any reasonable format.
Rules

Standard Loopholes Apply
This is a code-golf so the shortest answer in bytes wins
No answer will be accepted

Test Cases
Input -> Output
[[1, 2, 3], [4, 5, 6], [7, 8, 9]] -> [1, 1, 1]
[[1, 2, 3], [1, 2, 3]] -> [1, 2]
[[1, 2, 3], [3, 2, 1]] -> [1, 2]
[[1, 2, 3, 4], [4, 3, 2, 1]] -> [1, 1]
[[1, 1, 1], [1, 1, 1]] -> [1, 4]
[[1, 2, 3, 4], [2, 4, 3, 1]] -> [2, 1]
[[1, 2, 3, 4, 5, 6, 7], [2, 3, 3, 4], [5, 4, 3]] -> [1, 3, 4]
[[1, 2, 3, 4, 4], [1, 2, 3, 5, 4], [1, 2, 3, 4, 5]] -> [2, 3, 1]

Note: I drew inspiration for this challenge series from Advent Of Code. I have no affiliation with this site
You can see a list of all challenges in the series by looking at the 'Linked' section of the first challenge here.
Happy Golfing!

Not understand requirement: a cart = an array?

got: in[i][t-out[i]] all different for any t, and max out[i]+in.length smallest, if I rightly guess on the sample

@l4m2 what are you confused about? I think I made the spec clear enough... the array represents the path taken by each cart

I didn't carefully read the text(too hard to read for me, maybe my bad) and thought it was a 2D plate

JavaScript (ES7), 172 bytes
Returns an array of 0-indexed time frames.
a=>(g=k=>a.map((a,i)=>[l=a.length+1,i,a,L=L<l?l:L]).sort(([a],[b])=>a-b).every(([,n,b],i)=>b.every((c,t)=>o[t+=A[n]=k/L**i%L|0]&1<<c?0:o[t]|=1<<c),o=[],A=[])?A:g(k+1))(L=0)

NB: This can only work with labels in [0-31]. This is a JS limit, not a limit of the algorithm.
Test cases

let f =

a=>(g=k=>a.map((a,i)=>[l=a.length+1,i,a,L=L<l?l:L]).sort(([a],[b])=>a-b).every(([,n,b],i)=>b.every((c,t)=>o[t+=A[n]=k/L**i%L|0]&1<<c?0:o[t]|=1<<c),o=[],A=[])?A:g(k+1))(L=0)

console.log(JSON.stringify(f([[1, 2, 3], [4, 5, 6], [7, 8, 9]])))                   // -> [0, 0, 0]
console.log(JSON.stringify(f([[1, 2, 3], [1, 2, 3]])))                              // -> [0, 1] or [1, 0]
console.log(JSON.stringify(f([[1, 2, 3], [3, 2, 1]])))                              // -> [0, 1] or [1, 0]
console.log(JSON.stringify(f([[1, 2, 3, 4], [4, 3, 2, 1]])))                        // -> [0, 0]
console.log(JSON.stringify(f([[1, 1, 1], [1, 1, 1]])))                              // -> [0, 3] or [3, 0]
console.log(JSON.stringify(f([[1, 2, 3, 4], [2, 4, 3, 1]])))                        // -> [1, 0]
console.log(JSON.stringify(f([[1, 2, 3, 4, 5, 6, 7], [2, 3, 3, 4], [5, 4, 3]])))    // -> [0, 2, 3]
console.log(JSON.stringify(f([[1, 2, 3, 4, 4], [1, 2, 3, 5, 4], [1, 2, 3, 4, 5]]))) // -> [1, 2, 0]

Commented
a => (                         // given a = array of tracks
  g = k =>                     // g = recursive function taking k = counter
    a.map((t, i) => [          // map each track t in a to a new entry made of:
      l = t.length + 1,        //   - its length + 1 (l)
      i,                       //   - its original index in the input array
      t,                       //   - the original track data
      L = L < l ? l : L        //   and update the maximum track length L
    ])                         // end of map()
    .sort(([a], [b]) =>        // let's sort the tracks from shortest to longest
      a - b                    // so that solutions that attempt to delay short
    )                          // tracks are tried first
    .every(([, n, b],          // for each track b with an original position n,
                      i) =>    // now appearing at position i:
      b.every((c, t) =>        //   for each label c at position t in b:
        o[t += A[n] =          //     add to t the time frame A[n] corresponding
          k / L**i % L | 0     //     to this position (i) and this combination (k)
        ] & 1 << c ?           //     if the station c is already occupied at time t:
          0                    //       make every() fail
        :                      //     else:
          o[t] |= 1 << c       //       mark the station c as occupied at time t
      ),                       //   end of inner every()
      o = [],                  //   start with: o = empty array (station bitmasks)
      A = []                   //               A = empty array (time frames)
    ) ?                        // end of outer every(); if successful:
      A                        //   return A
    :                          // else:
      g(k + 1)                 //   try the next combination
)(L = 0)                       // initial call to g() + initialization of L

I suppose it's because of bitwise operators? (<< and |) That can be fixed by using an array of bool instead...

@user202729 Yes, it's because of bitwise operators on the values stored in o[]. (It could be done differently indeed, but I chose this method for golfier results in the first place.)


text:
The struggling college student's GPA Calculator
GPA Calculator
(GPA = Grade Point Average)
You are a stressed out college student during finals week. Instead of studying for your exams coming up, you decide it is best to determine what GPA you will have at the end of the semester. This way you have data to back up your decision of staying up all night to get that A in Calculus instead of a B to remain on the Dean's list!
Being a computer science major you want to find the coolest way to determine this GPA. Of course the coolest way is with the shortest code! This is code-golf, so shortest code in bytes wins!
Details

The college that you go to uses a basic GPA scaled along with credit hours.
A letter grade of A is a 4.0, B is 3.0, C is 2.0, D is 1.0, and F is 0.0
Your GPA is a weighted GPA, so an A in a 4 credit hour class counts 4 times as much as an A in a 1 credit hour class (See examples below for more weight explanantion)
Credit Hours range from 1-4
Your program will need to have a list of two command line inputs, Grade and Credit Hour. You can determine the best way to input these into your program through the command line. You do not need to worry about too many inputs, but ensure your code can handle a 19 credit hour semester.

i.e. Input: A 1 B 4 C 2…

Your program must output the GPA, using 3 digits (i.e. X.XX)
Your GPA needs to be rounded to two decimal places. Round in whichever way you like (floor, ceil, base, etc…)

Input Examples(Choose whichever one works best for your design)

A1B3C2F3B4
A1 B3 C2 F3 B4
A 1 B 3 C 2 F 3 B 4
A,1,B,3,C,2,F,3,B,4
A1,B3,C2,F3,B4

Or any of the above combinations where you use the format of listing all grades, then their credit hours:

i.e. A B A A 3 4 1 1

Examples
Input - A 3 B 4 A 1 A 1
Output - 3.56
Explanation: (4.0 * 3 + 3.0 * 4 + 4.0 * 1 + 4.0 * 1)/(3+4+1+1) = 3.555556 rounded off to 3.56

Input - A 4 F 2 C 3 D 4
Output - 2.00
Explanation: (4.0 * 4 + 0.0 * 2 + 2.0 * 3 + 1.0 * 4)/(4+2+3+4) = 2 rounded off to 2.00

@DevelopingDeveloper Please try to avoid Cumbersome I/O formats.

@JungHwanMin Please let me know which I/O option you wanted that I didn't specify? I gave about 6 different flexible options, but it needs to be specified to actually fit into this scenario.

@DevelopingDeveloper Your GPA needs to be rounded to two decimal places: to achieve this, people need to add additional code that has nothing to do with GPA calculation.

Welcome to PPCG. Nice first question in my humble opinion.

Despite this being a fairly interesting question, I downvoted, because, as I said before, forcing rounding and outputting with trailing 0s makes this a multipart challenge; answers are having to unnecessarily add bytes, simply to conform to the output specs, which make a challenge boring and worse overall IMO.

Jelly,  15  21 bytes (12 with no rounding)
+6 bytes for the strict formatting (almost certainly possible in less but it's bed time)
Oạ69.Ḟ×S×ȷ2÷⁹S¤RLDż”.

A full program taking the grades and the respective credit hours which prints the calculated GPA (Note: the rounding method is to floor, as allowed in the OP).
Try it online!
With no rounding for 12 bytes:
Oạ69.Ḟ×S÷⁹S¤

How?
Oạ69.Ḟ×S×ȷ2÷⁹S¤RLDż”. - Link: list of characters, grades; list of number, creditHours
                      -                                   e.g. "AFBDC", [5, 2, 4, 1, 2]
O                     - cast to ordinals (vectorises)          [65,70,66,68,67]
  69.                 - literal 69.5
 ạ                    - absolute difference (vectorises)       [4.5,0.5,3.5,1.5,2.5]
     Ḟ                - floor (vectorises)                     [4,0,3,1,2]
      ×               - multiply by creditHours (vectorises)   [20,0,12,1,4]
       S              - sum                                    37
         ȷ2           - literal 100
        ×             - multiply                               3700
              ¤       - nilad followed by link(s) as a nilad:
            ⁹         -   chain's right argument, creditHours  [5, 2, 4, 1, 2]
             S        -   sum                                  14
           ÷          - division                               264.2857142857143
               R      - range                                  [1,2,3,...,264]
                L     - length                                 264
                 D    - digits                                 [2,6,4]
                   ”. - literal '.'
                  ż   - zip together                           [[2,'.'],6,4]
                      - implicit print (smashing)              2.64

@nimi - good point, I missed that bit. Fixed.

Python 3, 66 bytes
-5 bytes thanks to Rod.
lambda g,c:'%.2f'%sum('FDCBA'.find(i)*j/sum(c)for i,j in zip(g,c))

Try it online!

69-ord(i) don't works

You have an extra (), also you can move the /sum(c) to save 3 bytes reaching 66 bytes

Perl 5, 57 53 + 2 (-an) = 59 55 bytes
$c+=$F[1];$\+=$F[1]*=!/F/&&69-ord}{printf'%.2f',$\/$c

Try it online!
Edit: swapped the input around to save 4 bytes
Input format: line separated, credits followed by grade:
grade credits

Example:
A 3
B 4
A 1
A 1

Python 2, 69 bytes
lambda x:'%.2f'%sum('FDCBA'.find(a)*b*1./sum(zip(*x)[1])for a,b in x)

Try it online!

Wolfram Language (Mathematica), 39 bytes
N[(5-LetterNumber@#2/.-1->0).#/Tr@#,3]&

Takes a list of credit hours, and then a string of grades.
Does not work on TIO because TIO uses Mathematica kernel (which doesn't want to print arbitrary precision numbers)

-3 bytes if you use Tr

This fails for second test case.It returns 1.85 because you count F=-1

Here is a 41bytes fix: N[(5-(LetterNumber@#2/. 6->5)).#/Tr@#,3]&

@Jenny_mathy nice catch. I have no idea how I missed that... The extra parenthesis could be golfed down by moving the /., though.

JavaScript (ES6), 72 bytes
Input format: A1B3C2F3B4
f=([c,d,...s],a=b=0)=>c?f(s,a+~'DCBA'.search(c,b-=d)*d):(a/b).toFixed(2)

Test cases

f=([c,d,...s],a=b=0)=>c?f(s,a+~'DCBA'.search(c,b-=d)*d):(a/b).toFixed(2)

console.log(f('A3B4A1A1')) // 3.56
console.log(f('A4F2C3D4')) // 2.00

At what point does search become golfier than parseInt?

@Neil parseInt would probably become golfier with just a few more supported grades. One problem is the gap between F=0 and D=1, though.

Huh, I hadn't even noticed that there's no E...

R, 64 bytes
function(G,H)sprintf("%.2f",(5-match(G,LETTERS[-5]))%*%H/sum(H))

Try it online!
thanks to user2390246 for fixing a bug!

I think you mean LETTERS[-5]

@user2390246 yes, of course. that was silly of me.

Java 1.8, 287 249 Bytes
-38 bytes thanks to Bumptious
Golfed
static String N(String[]j){float g=0;float b=0;for(int i=0;i<j.length;i+=2){g=((m(j[i])*Float.parseFloat(j[i+1])+g));b+=Double.parseDouble(j[i+1]);}return String.format("%.2f",g/b);}static float m(String l){return l.equals("F")?0:('E'-l.charAt(0));}

Ungolfed
interface C {
static void main(String[] z) throws Exception {
    String[] j = {"A", "4", "B", "3", "C", "2", "D", "1", "F", "1"};
    System.out.println(N(j));
}

static String N(String[] j) {
    float g = 0;
    float b = 0;
    for (int i = 0; i < j.length; i += 2) {
        g = ((m(j[i]) * Float.parseFloat(j[i + 1]) + g));
        b += Double.parseDouble(j[i + 1]);
    }
    return String.format("%.2f", g / b);
}

static float m(String l) {
    return l.equals("F") ? 0 : ('E' - l.charAt(0));
}
}

Reduce length by using this?
static float m(String l){return l.equals("F")?0:('E'-l.charAt(0));}

Java, 211 bytes
Input format: A1B3C2F3B4
Golfed
interface A{static void main(String[] a){int p=0,t=0,h=0,s=0;for(int c:a[0].toCharArray())if(p++%2==0)t=c=='A'?4:c=='B'?3:c=='C'?2:c=='D'?1:0;else{s+=(c-=48)*t;h+=c;}System.out.print(Math.ceil(100d*s/h)/100);}}

Unglofed
static void main(String[] a) {
    int p=0, //position in string
    t=0, //temp var, used to store the grade between iterations
    h=0, //credit sum
    s=0; //sum of weighted grade

    for(int c:a[0].toCharArray())
        if(p++%2==0)
            //map c to grade value, assign to temp variable t
            t=c=='A'?4:c=='B'?3:c=='C'?2:c=='D'?1:0;
        else{
            //map c to credit value, add temp variable (grade from previous char) * value of this char (credit) to sum
            s+=(c-=48)*t;
            //also, add credit to credit sum
            h+=c;
        }
    System.out.print(Math.ceil(100d*s/h)/100); //grade sum / credit hours sum, to 2dp*/
}

Other version
My gut frealing told me that using a different input format (ABCF1324) would make the code shorter. It seems like it didn't. The version below is 234 bytes long.
Golfed
interface A{static void main(String[] b){char[] a=b[0].toCharArray();int l=a.length/2,h=0,s=0,g,c,i;for(i=0;i<l;i++){g=a[i];g=g=='A'?4:g=='B'?3:g=='C'?2:g=='D'?1:0;c=a[i+l]-48;s+=g*c;h+=c;}System.out.print(Math.ceil(100d*s/h)/100);}}a

Ungolfed
static void main(String[] b) {
    char[] a=b[0].toCharArray(); //char array
    int l=a.length/2, //first grade char
    h=0, //credit sum
    s=0, //sum of weighted grade
    g,c, //avoid declaration in for loop. grade and credit being iterated
    i; //avoid declaration in for loop
    for(i=0;i<l;i++) {
        g=a[i];//get char representing grade from array
        g=g=='A'?4:g=='B'?3:g=='C'?2:g=='D'?1:0; //convert to grade
        c=a[i+l]-48;//get char representing grade from array and convert to credit (48 is value of '0')
        s+=g*c; //add weighted grade to sum
        h+=c; //add credit to sum
    }
    System.out.print(Math.ceil(100d*s/h)/100); //grade sum / credit hours sum, to 2dp*/
}

Hello and welcome! You are not required to answer with full programs, so you can chip off a lot of bytes like that.

Julia 0.6, 46 43 42 bytes
g%h=round(max.(69-Int.(g),0)⋅h/sum(h),2)

Try it online!
Explanation
Input format: g: vector of grades; h: vector of credit hours

g%h: Redefine % operator.
69-Int.(g): Convert 'F','D','C','B','A' to -1,1,2,3,4 respectively for each element of g.
max.( ,0): Clamp range to 0:4 (element-wise).
The rest is simple vector math.
Rounding costs 9 bytes.