結果

問題 No.1905 PURE PHRASE
ユーザー tassei903tassei903
提出日時 2022-04-15 22:44:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 999 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 87,392 KB
実行使用メモリ 84,712 KB
最終ジャッジ日時 2023-08-26 08:24:16
合計ジャッジ時間 7,815 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
83,924 KB
testcase_01 AC 142 ms
83,688 KB
testcase_02 AC 139 ms
83,808 KB
testcase_03 AC 144 ms
83,636 KB
testcase_04 AC 148 ms
83,600 KB
testcase_05 AC 142 ms
83,608 KB
testcase_06 AC 141 ms
83,756 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 141 ms
83,552 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 141 ms
83,528 KB
testcase_14 WA -
testcase_15 AC 143 ms
84,152 KB
testcase_16 WA -
testcase_17 AC 145 ms
83,792 KB
testcase_18 AC 144 ms
83,716 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 144 ms
83,524 KB
testcase_22 AC 142 ms
83,836 KB
testcase_23 AC 157 ms
83,592 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 144 ms
83,780 KB
testcase_28 WA -
testcase_29 AC 144 ms
84,044 KB
testcase_30 WA -
testcase_31 AC 144 ms
83,752 KB
testcase_32 AC 150 ms
83,560 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 141 ms
83,572 KB
testcase_36 AC 146 ms
84,244 KB
testcase_37 AC 140 ms
83,736 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 = 1000

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