結果

問題 No.1905 PURE PHRASE
ユーザー tassei903tassei903
提出日時 2022-04-15 22:45:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 998 bytes
コンパイル時間 1,771 ms
コンパイル使用メモリ 86,080 KB
実行使用メモリ 84,204 KB
最終ジャッジ日時 2023-08-26 08:25:04
合計ジャッジ時間 7,559 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
83,888 KB
testcase_01 AC 142 ms
83,336 KB
testcase_02 AC 134 ms
83,608 KB
testcase_03 AC 138 ms
83,620 KB
testcase_04 AC 139 ms
83,612 KB
testcase_05 AC 133 ms
83,676 KB
testcase_06 AC 138 ms
83,436 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 143 ms
83,440 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 136 ms
83,488 KB
testcase_14 WA -
testcase_15 AC 144 ms
83,944 KB
testcase_16 WA -
testcase_17 AC 140 ms
83,476 KB
testcase_18 AC 136 ms
83,520 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 140 ms
83,352 KB
testcase_22 AC 155 ms
83,512 KB
testcase_23 AC 143 ms
83,632 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 140 ms
83,508 KB
testcase_28 WA -
testcase_29 AC 148 ms
83,960 KB
testcase_30 WA -
testcase_31 AC 137 ms
83,484 KB
testcase_32 AC 140 ms
83,492 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 140 ms
83,776 KB
testcase_36 AC 155 ms
83,460 KB
testcase_37 AC 134 ms
83,400 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 = 1000
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 = 200

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