結果
問題 | No.352 カード並べ |
ユーザー | fumofumofuni |
提出日時 | 2021-09-13 22:48:45 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 75 ms / 2,000 ms |
コード長 | 235 bytes |
コンパイル時間 | 304 ms |
コンパイル使用メモリ | 87,228 KB |
実行使用メモリ | 71,412 KB |
最終ジャッジ日時 | 2023-09-08 06:49:01 |
合計ジャッジ時間 | 1,692 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
70,968 KB |
testcase_01 | AC | 74 ms
70,856 KB |
testcase_02 | AC | 74 ms
71,052 KB |
testcase_03 | AC | 73 ms
71,192 KB |
testcase_04 | AC | 75 ms
71,144 KB |
testcase_05 | AC | 72 ms
71,412 KB |
testcase_06 | AC | 72 ms
71,348 KB |
testcase_07 | AC | 72 ms
71,368 KB |
testcase_08 | AC | 74 ms
71,260 KB |
ソースコード
N=int(input()) ans=0.0 i=1 while i<=N: sx=(i)*(i-1)/2 sx=sx*sx j=1 while j<i: sx-=j*j j+=1 res=(i-1)*(i-2) if res: sx/=res res=2.0+sx*(i-2) ans+=res/i i+=1 print(ans-1)