結果

問題 No.1389 Clumsy Calculation
ユーザー mesame3993mesame3993
提出日時 2021-10-30 03:24:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 107,648 KB
最終ジャッジ日時 2024-04-16 16:08:37
合計ジャッジ時間 3,492 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,904 KB
testcase_01 AC 41 ms
52,224 KB
testcase_02 AC 41 ms
51,940 KB
testcase_03 AC 48 ms
59,776 KB
testcase_04 AC 45 ms
59,648 KB
testcase_05 AC 44 ms
59,776 KB
testcase_06 AC 44 ms
59,648 KB
testcase_07 AC 45 ms
59,392 KB
testcase_08 AC 39 ms
51,712 KB
testcase_09 AC 102 ms
102,272 KB
testcase_10 AC 73 ms
96,256 KB
testcase_11 AC 45 ms
59,136 KB
testcase_12 AC 45 ms
59,392 KB
testcase_13 AC 45 ms
59,392 KB
testcase_14 AC 87 ms
104,192 KB
testcase_15 AC 87 ms
103,936 KB
testcase_16 AC 86 ms
104,320 KB
testcase_17 AC 91 ms
107,428 KB
testcase_18 AC 92 ms
107,648 KB
testcase_19 AC 93 ms
107,008 KB
testcase_20 AC 92 ms
107,520 KB
testcase_21 AC 92 ms
107,456 KB
testcase_22 AC 92 ms
107,352 KB
testcase_23 AC 91 ms
107,400 KB
testcase_24 AC 91 ms
107,108 KB
testcase_25 AC 91 ms
107,172 KB
testcase_26 AC 86 ms
103,936 KB
testcase_27 AC 86 ms
104,192 KB
testcase_28 AC 91 ms
107,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x = map(int, input().split())
s = list(map(int, input().split()))
t = sum(s)
for i in range(n):
  tmp = (t - s[i]//2) // (n-1)
  if tmp == x and s[i]%2 == 0 and (t - s[i]//2)%(n-1)==0:
    print(s[i] // 2)
    exit()
0