Problem: We have A balls with the string S written on each of them and B balls with the string T written on each of them.   From these balls, Takahashi chooses one with the string U written on it and throws it away.   Find the number of balls with the string S and balls with the string T that we have now.

Submission attempts (in order):
Last login: Wed Mar  4 17:18:27 on ttys000
~ tmux
zsh: command not found: tmux
~ brew install tmux
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
ccm          fobis        gcovr        gitlab-gem   nginx        passenger

==> Installing dependencies for tmux: utf8proc
==> Installing tmux dependency: utf8proc
==> Downloading https://homebrew.bintray.com/bottles/utf8proc-2.4.0.catalina.bot
######################################################################## 100.0%
==> Pouring utf8proc-2.4.0.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/utf8proc/2.4.0: 10 files, 648.1KB
==> Installing tmux
==> Downloading https://homebrew.bintray.com/bottles/tmux-3.0a_1.catalina.bottle
==> Downloading from https://akamai.bintray.com/d8/d83b378969a8af595451db10bf4b8
######################################################################## 100.0%
==> Pouring tmux-3.0a_1.catalina.bottle.tar.gz
==> Caveats
Example configuration has been installed to:
  /usr/local/opt/tmux/share/tmux

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/tmux/3.0a_1: 9 files, 803.1KB
==> Caveats
==> tmux
Example configuration has been installed to:
  /usr/local/opt/tmux/share/tmux

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
~ 
~ 
~ 
~ tmux ls
error connecting to /tmp//tmux-501/default (No such file or directory)
~ tmux
[exited]
~ tmux new -s normal
[exited]
~ 
~ 
~ 
~ 
~ cd
~ cd atcoder
~/atcoder ll
total 80
drwxr-xr-x    7 yoshidafumiya  staff    224  3  4 16:59 .
drwxr-xr-x+ 108 yoshidafumiya  staff   3456  3  4 17:28 ..
drwxr-xr-x    5 yoshidafumiya  staff    160  3  1 20:26 .ipynb_checkpoints
-rw-r--r--    1 yoshidafumiya  staff   3801  3  1 20:55 155.ipynb
-rw-r--r--    1 yoshidafumiya  staff  12413  3  1 17:28 156.ipynb
-rw-r--r--    1 yoshidafumiya  staff  15032  3  4 16:59 157.ipynb
-rw-r--r--    1 yoshidafumiya  staff    785  3  4 16:59 157c.py
~/atcoder mkdir 155
~/atcoder mv 155.ipynb 155
~/atcoder mkdir 156
~/atcoder mv 156.ipynb 156
~/atcoder mkdir 157
~/atcoder mv 157.ipynb 157
~/atcoder mv 157c.py 157
~/atcoder ll
total 0
drwxr-xr-x    6 yoshidafumiya  staff   192  3  4 17:47 .
drwxr-xr-x+ 108 yoshidafumiya  staff  3456  3  4 17:28 ..
drwxr-xr-x    5 yoshidafumiya  staff   160  3  1 20:26 .ipynb_checkpoints
drwxr-xr-x    3 yoshidafumiya  staff    96  3  4 17:47 155
drwxr-xr-x    3 yoshidafumiya  staff    96  3  4 17:47 156
drwxr-xr-x    4 yoshidafumiya  staff   128  3  4 17:47 157
~/atcoder mkdir 154
~/atcoder cd 154
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
redTraceback (most recent call last):
  File "a.py", line 1, in <module>
    s,t = map(int,input().split())
ValueError: invalid literal for int() with base 10: 'red'
~/atcoder/154 3 4
zsh: command not found: 3
~/atcoder/154 p a.py
^CTraceback (most recent call last):
  File "a.py", line 1, in <module>
    s,t = map(int,input().split())
KeyboardInterrupt
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
red
Traceback (most recent call last):
  File "a.py", line 3, in <module>
    u = int(input())
ValueError: invalid literal for int() with base 10: 'red'
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
red
2
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
red
('red', 2)
('blue', 4)
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
text = text[:-1]
Traceback (most recent call last):
  File "a.py", line 1, in <module>
    s,t = map(str,input().split())
ValueError: too many values to unpack (expected 2)
~/atcoder/154 p a.py
red blue
3 4
red
Traceback (most recent call last):
  File "a.py", line 13, in <module>
    ans = ans + value + ' '
TypeError: can only concatenate str (not "int") to str
~/atcoder/154 vi a.py
~/atcoder/154 p a.py 
red blue
3 4
red
2 4
~/atcoder/154 p a.py
red blue
5 5
blue
5 4
~/atcoder/154 p a.py
^CTraceback (most recent call last):
  File "a.py", line 1, in <module>
    s,t = map(str,input().split())
KeyboardInterrupt
~/atcoder/154 vi a.py

s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())

h1 = {}
h1[s] = a
h1[t] = b

h1[u] = h1[u] - 1

ans = ''
for key, value in h1.items():
    ans = ans + str(value) + ' '

ans = ans[:-1]
print(ans)                                                                                

s,t = map(str,input().split())
a,b = map(int,input().split())
u = str(input())

h1 = {}
h1[s] = a
h1[t] = b

h1[u] = h1[u] - 1

print(h1[s],h1[t])

Verdicts: Runtime Error

Accepted