結果
問題 |
No.352 カード並べ
|
ユーザー |
|
提出日時 | 2021-09-13 22:48:45 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 235 bytes |
コンパイル時間 | 924 ms |
コンパイル使用メモリ | 82,044 KB |
実行使用メモリ | 53,472 KB |
最終ジャッジ日時 | 2024-06-26 00:05:11 |
合計ジャッジ時間 | 1,294 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 |
ソースコード
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)