結果
| 問題 | No.2906 Strange Online Judge |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2024-09-05 01:42:45 |
| 言語 | Text (cat 8.3) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 825 bytes |
| コンパイル時間 | 33 ms |
| コンパイル使用メモリ | 5,248 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-09 15:05:07 |
| 合計ジャッジ時間 | 1,865 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
ifK<=2 # if K<=2:
$1=K*K # $0 := (K**2+1)*(K**3+3*K) = U_6(K,-1);
$0=$1+1 # $1 := (K**3+3*K)**2+2 = V_6(K,-1);
$1=$1+3
$1=$1*K
$0=$0*$1
$1=$1*$1
$1=$1+2
end # end
ifK>=3 # if K>=3:
$0=K # $0 := K = U_2(K,-1);
$1=K*K # $1 := K**2+2 = V_2(K,-1);
$1=$1+2
end # end
$3=100000/K
while$0<$3 # while $0<10**5/K:
$0=$0*$1 # $0,$1 := ($0*$1),($1*$1-2) = U_{2n}(K,-1),V_{2n}(K,-1); (where n mod 2 = 0)
$1=$1*$1
$1=$1-2
end # end
$2=K*$0 # $0,$1 := ($0),((K*$0)+$1)/2 = U_{n}(K,-1),U_{n+1}(K,-1); (where n mod 2 = 0)
$1=$1+$2
$1=$1/2
$3=1000000000/K
while$1<=$3 # while $1<=10**9/K:
$2=$1*K # $1,$0 := ((($1*K+$0)*K+$1),($1*K+$0))
$0=$2+$0
$2=$0*K
$1=$1+$2
end # end
$0=$0*N # return ($0*N/$1+N);
$0=$0/$1
$0=$0+N
return$0