This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: Playground - noun: a place where people can play | |
| //:累乗をするための関数を定義する | |
| func jyou(n : Double, x:Int) -> Double { | |
| var ans = 1.0 | |
| for _ in 1...x{ | |
| ans *= n | |
| } | |
| return ans | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| func jyou(n : Double, x:Int) -> Double { | |
| var ans = 1.0 | |
| for _ in 1...x{ | |
| ans *= n | |
| } | |
| return ans |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int list[k]; | |
| for ( b = 0; b < k; b++) { | |
| list[b] = 0; | |
| } | |
| int alive = k; | |
| int check = -1; | |
| while (alive !=0) { | |
| for (c = 0; c < l; c++) { | |
| do { | |
| check++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void func1(int n,int from, int to,int work,FILE *fq){ | |
| if (n>0) { | |
| func1(n-1,from,work,to,fq); | |
| fprintf(fq,"%d %d %d\n",n, from, to ); | |
| func1(n-1,work,to,from,fq); | |
| } | |
| } |
NewerOlder