結果

問題 No.1180 無限和
ユーザー hotman78hotman78
提出日時 2020-08-21 22:55:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 33 ms / 1,000 ms
コード長 1,188 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-04-23 06:29:58
合計ジャッジ時間 2,168 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
11,136 KB
testcase_01 AC 30 ms
11,136 KB
testcase_02 AC 27 ms
11,136 KB
testcase_03 AC 26 ms
11,136 KB
testcase_04 AC 28 ms
11,136 KB
testcase_05 AC 28 ms
11,136 KB
testcase_06 AC 29 ms
11,136 KB
testcase_07 AC 27 ms
11,136 KB
testcase_08 AC 26 ms
11,136 KB
testcase_09 AC 27 ms
11,136 KB
testcase_10 AC 30 ms
11,136 KB
testcase_11 AC 27 ms
11,136 KB
testcase_12 AC 26 ms
11,136 KB
testcase_13 AC 27 ms
11,136 KB
testcase_14 AC 29 ms
11,264 KB
testcase_15 AC 33 ms
11,136 KB
testcase_16 AC 27 ms
11,136 KB
testcase_17 AC 28 ms
11,136 KB
testcase_18 AC 27 ms
11,136 KB
testcase_19 AC 28 ms
11,136 KB
testcase_20 AC 29 ms
11,136 KB
testcase_21 AC 29 ms
11,264 KB
testcase_22 AC 28 ms
11,264 KB
testcase_23 AC 29 ms
11,264 KB
testcase_24 AC 28 ms
11,264 KB
testcase_25 AC 27 ms
11,136 KB
testcase_26 AC 28 ms
11,136 KB
testcase_27 AC 29 ms
11,136 KB
testcase_28 AC 27 ms
11,136 KB
testcase_29 AC 30 ms
11,136 KB
testcase_30 AC 30 ms
11,136 KB
testcase_31 AC 27 ms
11,136 KB
testcase_32 AC 27 ms
11,136 KB
testcase_33 AC 29 ms
11,264 KB
testcase_34 AC 28 ms
11,136 KB
testcase_35 AC 28 ms
11,136 KB
testcase_36 AC 32 ms
11,136 KB
testcase_37 AC 28 ms
11,136 KB
testcase_38 AC 29 ms
11,264 KB
testcase_39 AC 27 ms
11,136 KB
testcase_40 AC 26 ms
11,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import Decimal
pi=Decimal(3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989)
tmp=pi*pi/Decimal(6)
n=int(input())
ans=Decimal(1)/Decimal(n)
while n!=0:
    if(n%2==1):
        ans*=tmp
    tmp*=tmp
    n//=2
print(int(ans))
0