結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,944 KB
testcase_01 WA -
testcase_02 AC 16 ms
7,940 KB
testcase_03 AC 16 ms
7,984 KB
testcase_04 AC 16 ms
8,208 KB
testcase_05 AC 64 ms
10,024 KB
testcase_06 AC 52 ms
9,484 KB
testcase_07 AC 61 ms
10,036 KB
testcase_08 AC 29 ms
8,852 KB
testcase_09 AC 53 ms
10,184 KB
testcase_10 AC 34 ms
9,004 KB
testcase_11 AC 46 ms
9,532 KB
testcase_12 AC 46 ms
9,340 KB
testcase_13 AC 16 ms
8,344 KB
testcase_14 AC 16 ms
8,240 KB
testcase_15 AC 16 ms
8,200 KB
testcase_16 AC 16 ms
8,196 KB
testcase_17 AC 16 ms
8,236 KB
testcase_18 AC 16 ms
8,300 KB
testcase_19 AC 16 ms
8,256 KB
testcase_20 AC 16 ms
8,280 KB
testcase_21 AC 16 ms
8,344 KB
testcase_22 AC 80 ms
10,476 KB
testcase_23 AC 74 ms
10,516 KB
testcase_24 AC 77 ms
10,520 KB
testcase_25 AC 81 ms
10,616 KB
testcase_26 AC 88 ms
10,556 KB
testcase_27 AC 80 ms
10,428 KB
testcase_28 AC 71 ms
10,492 KB
testcase_29 AC 87 ms
10,548 KB
testcase_30 AC 64 ms
10,660 KB
testcase_31 AC 88 ms
10,604 KB
testcase_32 AC 86 ms
10,592 KB
testcase_33 AC 72 ms
10,520 KB
testcase_34 AC 77 ms
10,512 KB
testcase_35 AC 81 ms
10,548 KB
testcase_36 AC 75 ms
10,504 KB
testcase_37 AC 89 ms
10,600 KB
testcase_38 AC 85 ms
10,548 KB
testcase_39 AC 67 ms
10,552 KB
testcase_40 AC 86 ms
10,492 KB
testcase_41 AC 73 ms
10,612 KB
testcase_42 AC 96 ms
16,256 KB
testcase_43 AC 16 ms
8,300 KB
testcase_44 AC 16 ms
8,292 KB
testcase_45 AC 78 ms
10,144 KB
testcase_46 AC 71 ms
10,232 KB
testcase_47 AC 89 ms
10,132 KB
testcase_48 AC 93 ms
13,068 KB
testcase_49 AC 77 ms
13,168 KB
testcase_50 AC 92 ms
13,144 KB
testcase_51 AC 92 ms
13,104 KB
testcase_52 AC 95 ms
13,088 KB
testcase_53 AC 16 ms
8,380 KB
testcase_54 AC 16 ms
7,908 KB
testcase_55 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n, k = map(int,input().split())
a = list(map(int,input().split()))
l = 6350400
if(n == 1):
  print("1/1")
  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