結果

問題 No.1274 楽しい格子点
ユーザー marroncastlemarroncastle
提出日時 2020-10-30 23:41:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 389 ms
コンパイル使用メモリ 87,356 KB
実行使用メモリ 79,424 KB
最終ジャッジ日時 2023-09-29 08:42:38
合計ジャッジ時間 7,392 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 85 ms
76,436 KB
testcase_02 WA -
testcase_03 AC 79 ms
76,112 KB
testcase_04 WA -
testcase_05 AC 98 ms
77,084 KB
testcase_06 WA -
testcase_07 AC 84 ms
76,584 KB
testcase_08 AC 75 ms
76,048 KB
testcase_09 AC 98 ms
76,748 KB
testcase_10 AC 100 ms
76,864 KB
testcase_11 WA -
testcase_12 AC 97 ms
77,044 KB
testcase_13 AC 99 ms
76,744 KB
testcase_14 WA -
testcase_15 AC 84 ms
76,444 KB
testcase_16 AC 102 ms
77,084 KB
testcase_17 AC 100 ms
76,988 KB
testcase_18 AC 98 ms
76,920 KB
testcase_19 AC 100 ms
76,916 KB
testcase_20 AC 98 ms
76,832 KB
testcase_21 AC 86 ms
76,548 KB
testcase_22 AC 77 ms
76,012 KB
testcase_23 AC 77 ms
76,052 KB
testcase_24 AC 77 ms
75,896 KB
testcase_25 AC 75 ms
76,108 KB
testcase_26 AC 78 ms
76,016 KB
testcase_27 AC 78 ms
76,052 KB
testcase_28 AC 77 ms
76,064 KB
testcase_29 AC 78 ms
76,044 KB
testcase_30 AC 77 ms
76,092 KB
testcase_31 AC 79 ms
76,160 KB
testcase_32 AC 79 ms
75,820 KB
testcase_33 AC 80 ms
76,124 KB
testcase_34 AC 79 ms
76,096 KB
testcase_35 AC 81 ms
76,120 KB
testcase_36 AC 81 ms
76,020 KB
testcase_37 AC 79 ms
76,128 KB
testcase_38 AC 80 ms
76,116 KB
testcase_39 AC 79 ms
76,096 KB
testcase_40 AC 77 ms
76,104 KB
testcase_41 AC 76 ms
75,900 KB
testcase_42 AC 82 ms
76,576 KB
testcase_43 AC 89 ms
76,440 KB
testcase_44 AC 80 ms
76,008 KB
testcase_45 AC 83 ms
75,960 KB
testcase_46 AC 83 ms
75,804 KB
testcase_47 AC 82 ms
75,780 KB
testcase_48 AC 84 ms
75,996 KB
testcase_49 AC 89 ms
76,700 KB
testcase_50 AC 81 ms
75,968 KB
testcase_51 AC 86 ms
76,540 KB
testcase_52 RE -
testcase_53 AC 80 ms
76,604 KB
testcase_54 AC 80 ms
76,124 KB
testcase_55 AC 98 ms
76,960 KB
testcase_56 WA -
testcase_57 AC 77 ms
75,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
A, B = map(int, input().split())
ans = 0
if A==B:
  for i in range(1,101,abs(A)):
    ans += 1/pow(i+i,i+i)
else:
  g = gcd(A,B)
  for i in range(1,101):
    for j in range(1,101):
      if g==1 or (i%g==1 and j%g==1):
        ans += 1/pow(i+j,i+j)
print(ans)
0