結果

問題 No.1501 酔歩
ユーザー 遭難者遭難者
提出日時 2021-05-07 13:17:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 304 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 16,148 KB
最終ジャッジ日時 2023-10-13 04:12:17
合計ジャッジ時間 5,414 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,972 KB
testcase_01 AC 16 ms
8,192 KB
testcase_02 AC 16 ms
7,948 KB
testcase_03 AC 16 ms
7,972 KB
testcase_04 WA -
testcase_05 AC 64 ms
10,112 KB
testcase_06 AC 53 ms
9,568 KB
testcase_07 AC 58 ms
10,100 KB
testcase_08 AC 29 ms
8,712 KB
testcase_09 AC 52 ms
10,152 KB
testcase_10 AC 34 ms
8,984 KB
testcase_11 AC 46 ms
9,528 KB
testcase_12 AC 48 ms
9,192 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 80 ms
10,560 KB
testcase_23 AC 72 ms
10,528 KB
testcase_24 AC 79 ms
10,572 KB
testcase_25 AC 83 ms
10,500 KB
testcase_26 AC 89 ms
10,592 KB
testcase_27 AC 79 ms
10,528 KB
testcase_28 AC 69 ms
10,556 KB
testcase_29 AC 85 ms
10,420 KB
testcase_30 AC 64 ms
10,428 KB
testcase_31 AC 86 ms
10,596 KB
testcase_32 AC 85 ms
10,444 KB
testcase_33 AC 74 ms
10,424 KB
testcase_34 AC 78 ms
10,480 KB
testcase_35 AC 83 ms
10,568 KB
testcase_36 AC 76 ms
10,624 KB
testcase_37 AC 89 ms
10,528 KB
testcase_38 AC 87 ms
10,628 KB
testcase_39 AC 66 ms
10,452 KB
testcase_40 AC 85 ms
10,472 KB
testcase_41 AC 73 ms
10,448 KB
testcase_42 AC 95 ms
16,148 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 80 ms
10,024 KB
testcase_46 AC 72 ms
10,028 KB
testcase_47 AC 94 ms
10,224 KB
testcase_48 AC 96 ms
13,040 KB
testcase_49 AC 78 ms
13,004 KB
testcase_50 AC 94 ms
13,020 KB
testcase_51 AC 95 ms
13,188 KB
testcase_52 AC 97 ms
13,004 KB
testcase_53 WA -
testcase_54 AC 16 ms
8,064 KB
testcase_55 AC 16 ms
8,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n, k = map(int,input().split())
a = list(map(int,input().split()))
l = 6350400
if(k == 1):
  print("0")
  exit()
p = q = 0
for i in range(k - 1):
  p += l // (a[i] * a[i + 1])
for i in range(n - 1):
  q += l // (a[i] * a[i + 1])
l = math.gcd(p, q)
p //= l
q //= l
print(str(p) + '/' + str(q))
0