@634

累乗

Advertisement

説明

ある値をある回数かけること。

累乗算出

これ、効率悪そう。
public static int getInvokution(int n1, int n2){
    int result = n1;
    for(int i = 0; i < n2 - 1; i++){
        result = result * n1;
    }
    return result;
}

Advertisement

ショートカット

634
634ブログ
このカテゴリのトップページに戻る
Incubator(Pukiwiki)
634ラボ
   UIコレクションギャラリー
   ZO-3ジェネレーター

サイト検索


Y!ログール

ビリヤード