結果
| 問題 |
No.3173 じゃんけんの勝ちの回数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-06 22:09:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 305 ms / 2,000 ms |
| コード長 | 793 bytes |
| コンパイル時間 | 500 ms |
| コンパイル使用メモリ | 81,792 KB |
| 実行使用メモリ | 91,392 KB |
| 最終ジャッジ日時 | 2025-06-06 22:09:52 |
| 合計ジャッジ時間 | 11,655 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 33 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
t = int(input())
#a = list(map(int,input().split()))
#a = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
# a.append(list(map(int,input().split())))
def calc(a,b):
ans = 0
for i in range(3):
ans += min(a[i],b[(i+1)%3])
return ans
def calc2(a,b):
ans = []
for i in range(3):
x = b[i] + b[i-1]
if a[i] >= x:
ans.append(a[i] - x)
return ans[0] if ans else 0
def solve():
a = list(map(int,input().split()))
b = list(map(int,input().split()))
print(calc2(a[:],b[:]),calc(a[:],b[:]))
for i in range(t):
solve()