結果
問題 | No.133 カードゲーム |
ユーザー |
![]() |
提出日時 | 2022-07-14 19:23:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 528 ms / 5,000 ms |
コード長 | 360 bytes |
コンパイル時間 | 182 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-06-26 03:43:49 |
合計ジャッジ時間 | 12,107 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 |
ソースコード
from random import shuffle N = int(input()) A = list(map(int,input().split())) B = list(map(int,input().split())) s = 0 t = 0 for _ in range(100000): shuffle(A) shuffle(B) cnt = 0 for i in range(N): if A[i] > B[i]: cnt += 1 if A[i] < B[i]: cnt -= 1 if cnt >= 1: s += 1 t += 1 print(s / t)