結果

問題 No.2906 Strange Online Judge
ユーザー 👑 MizarMizar
提出日時 2024-06-19 02:38:08
言語 Text
(cat 8.3)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 1,912 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-09 15:04:57
合計ジャッジ時間 1,751 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 0 ms
5,376 KB
testcase_02 AC 0 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 0 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 0 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ifK<=19
  ifK<=9
    ifK<=4
      ifK==1
        $0=701408733
        $1=1134903170
      end
      ifK==2
        $0=543339720
        $1=1311738121
      end
      ifK==3
        $0=606529080
        $1=2003229469
      end
      ifK==4
        $0=133957148
        $1=567451585
      end
    end
    ifK>=5
      ifK==5
        $0=71351280
        $1=370497401
      end
      ifK==6
        $0=474094764
        $1=2921503573
      end
      ifK==7
        $0=47301793
        $1=337737401
      end
      ifK==8
        $0=151693352
        $1=1232221121
      end
      ifK==9
        $0=426938895
        $1=3889316089
      end
    end
  end
  ifK>=10
    ifK<=14
      ifK==10
        $0=10610040
        $1=107151001
      end
      ifK==11
        $0=20466831
        $1=226980634
      end
      ifK==12
        $0=37342128
        $1=451196065
      end
      ifK==13
        $0=64998297
        $1=849948490
      end
      ifK==14
        $0=108667944
        $1=1529074009
      end
    end
    ifK>=15
      ifK==15
        $0=175449435
        $1=2643386626
      end
      ifK==16
        $0=274767936
        $1=4413393409
      end
      ifK==17
        $0=418907013
        $1=7145976130
      end
      ifK==18
        $0=623615832
        $1=11259624025
      end
      ifK==19
        $0=908796999
        $1=17314842634
      end
    end
  end
end
ifK>=20
  $1=K*K        # $1 := K**2+1; // P_3
  $1=$1+1
  ifK<64
    $2=$1*K     # $1,$0 := ((($1*K+K)*K+$1),($1*K+K)) // (P_5, P_4)
    $0=$2+K
    $2=$0*K
    $1=$1+$2
    $2=$1*K     # $1,$0 := ((($1*K+$0)*K+$1),($1*K+$0)) // (P_7, P_6)
    $0=$2+$0
    $2=$0*K
    $1=$1+$2
  end
  ifK>=64
    $0=K        # $0 := K; // P_2
    ifK<1000
      $2=$1*K   # $1,$0 := ((($1*K+$0)*K+$1),($1*K+$0)) // (P_5, P_4)
      $0=$2+$0
      $2=$0*K
      $1=$1+$2
    end
  end
end
$0=$0*N         # return ($0*N/$1+N);
$0=$0/$1
$0=$0+N
return$0
0