結果

問題 No.1274 楽しい格子点
ユーザー mkawa2mkawa2
提出日時 2021-08-29 17:50:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 856 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,992 KB
実行使用メモリ 8,528 KB
最終ジャッジ日時 2023-08-14 10:47:26
合計ジャッジ時間 43,087 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 260 ms
8,080 KB
testcase_02 TLE -
testcase_03 AC 44 ms
8,044 KB
testcase_04 TLE -
testcase_05 TLE -
testcase_06 TLE -
testcase_07 AC 543 ms
8,136 KB
testcase_08 AC 17 ms
8,328 KB
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 AC 548 ms
8,044 KB
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 AC 547 ms
8,136 KB
testcase_22 AC 16 ms
8,384 KB
testcase_23 AC 17 ms
8,348 KB
testcase_24 AC 17 ms
8,352 KB
testcase_25 AC 16 ms
8,492 KB
testcase_26 AC 16 ms
8,504 KB
testcase_27 AC 16 ms
8,300 KB
testcase_28 AC 16 ms
8,436 KB
testcase_29 AC 16 ms
8,376 KB
testcase_30 AC 16 ms
8,376 KB
testcase_31 AC 19 ms
8,528 KB
testcase_32 AC 16 ms
8,300 KB
testcase_33 AC 15 ms
8,364 KB
testcase_34 AC 16 ms
8,316 KB
testcase_35 AC 16 ms
8,376 KB
testcase_36 AC 16 ms
8,436 KB
testcase_37 AC 16 ms
8,360 KB
testcase_38 AC 16 ms
8,312 KB
testcase_39 AC 16 ms
8,316 KB
testcase_40 AC 16 ms
8,456 KB
testcase_41 AC 16 ms
8,436 KB
testcase_42 AC 74 ms
8,084 KB
testcase_43 AC 76 ms
8,200 KB
testcase_44 AC 43 ms
8,004 KB
testcase_45 AC 49 ms
8,196 KB
testcase_46 AC 50 ms
8,076 KB
testcase_47 AC 23 ms
8,364 KB
testcase_48 AC 44 ms
8,088 KB
testcase_49 AC 540 ms
8,040 KB
testcase_50 AC 50 ms
8,008 KB
testcase_51 AC 38 ms
8,136 KB
testcase_52 WA -
testcase_53 AC 151 ms
8,048 KB
testcase_54 AC 62 ms
8,080 KB
testcase_55 TLE -
testcase_56 TLE -
testcase_57 AC 15 ms
8,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

# sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
inf = 10**9
# md = 998244353
md = 10**9+7

from math import gcd

a, b = LI()
g = gcd(a, b)
ans = 0
for i in range(500):
    x = 1+g*i
    if x > 500: break
    for j in range(500):
        y = 1+g*j
        if y > 500: break
        ans += 1/(x+y)**(x+y)

print("{:.7f}".format(ans))
0