結果
| 問題 |
No.2920 Blood Type
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 15:04:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 51 ms / 2,000 ms |
| コード長 | 852 bytes |
| コンパイル時間 | 322 ms |
| コンパイル使用メモリ | 82,320 KB |
| 実行使用メモリ | 62,700 KB |
| 最終ジャッジ日時 | 2024-10-12 15:04:35 |
| 合計ジャッジ時間 | 3,040 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
ソースコード
import sys
import math
from itertools import product, permutations, combinations, accumulate
from heapq import heapify, heappush, heappop
from collections import deque, defaultdict, Counter
from bisect import bisect, bisect_left, bisect_right
from copy import copy, deepcopy
#from sortedcontainers import SortedSet, SortedList, SortedDict
sys.setrecursionlimit(10**7)
INF = float('inf')
LINF = 1 << 60
MOD = 10**9+7
def mii():
return map(int, sys.stdin.readline().split())
S = input()
T = input()
ans = [0]*4
for u, v in product(list(S), list(T)):
s = [u, v]
if "A" in s and "B" not in s:
ans[0] += 1
elif "B" in s and "A" not in s:
ans[1] += 1
elif "A" in s and "B" in s:
ans[2] += 1
else:
ans[3] += 1
su = sum(ans)
a = []
for i in range(4):
a.append(int(ans[i] / su * 100))
print(*a)