結果

問題 No.1905 PURE PHRASE
ユーザー tassei903tassei903
提出日時 2022-04-15 22:52:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,000 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,248 KB
実行使用メモリ 84,832 KB
最終ジャッジ日時 2023-08-26 08:30:11
合計ジャッジ時間 41,876 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 972 ms
84,344 KB
testcase_01 AC 945 ms
83,604 KB
testcase_02 AC 935 ms
83,648 KB
testcase_03 AC 924 ms
83,688 KB
testcase_04 AC 923 ms
83,664 KB
testcase_05 AC 925 ms
83,876 KB
testcase_06 AC 916 ms
84,020 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 937 ms
84,008 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 930 ms
83,876 KB
testcase_14 WA -
testcase_15 AC 947 ms
84,092 KB
testcase_16 WA -
testcase_17 AC 962 ms
83,936 KB
testcase_18 AC 923 ms
83,636 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 935 ms
83,888 KB
testcase_22 AC 930 ms
83,740 KB
testcase_23 AC 945 ms
83,724 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 950 ms
83,720 KB
testcase_28 WA -
testcase_29 AC 967 ms
84,404 KB
testcase_30 WA -
testcase_31 AC 915 ms
83,888 KB
testcase_32 AC 932 ms
83,860 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 929 ms
83,976 KB
testcase_36 WA -
testcase_37 AC 930 ms
83,716 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################

ni()
n = 44100
m = 500000
a = na()
def f(x):
    r = floor(x)
    #print(x-r,1-x+r)
    return a[r]*(x-r)+a[r+1]*(1-x+r)

z = [261.6, 294.3, 327.0, 348.0, 392.4, 436.0, 495.0]
from math import floor
from random import random as rand, randint

eps = 100

ans = []
for i in range(7):
    x = n/z[i]
    
    # xの周期があるか調べる
    r = floor(z[i])-1
    # r個の区間[0, x),[x,2*x],,,,[(r-1)x, rx)
    d = 0
    for i in range(m):
        p,q = randint(0,r-1),randint(0,r-1)
        y = rand()*x
        if abs(f(y+p*x)-f(y+q*x))<=eps:
            d += 1
    ans.append(d)
#print(ans)
p = ans.index(max(ans))
print(chr(p+65+2)+"4")
0