This file contains 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
#include<stdio.h> | |
int main() | |
{ | |
printf("GoodNight!"); | |
return 0; | |
} |
This file contains 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
import java.io.PrintWriter; | |
import java.util.*; | |
//確定でない部の期待値を、熱狂度で重み付けしているバージョン | |
//重みが熱狂度の2乗に比例してるバージョン | |
//さらに、3〜7ターン目において、nターン目に、残りの使える好感度の(n+2)割以上使わないとダメな場合はターゲットから外す。 | |
public class ProbAI { | |
static int MaxTurn, Turn, PlayersNum, JoshisNum, CanGet, CanGet2, CanGet_after_next, Left_turn, NotKaburi, DatedCount, NowSum; | |
static char Day; | |
static Joshi[] Joshis; |
This file contains 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
(define limit (read)) | |
(define (read-input-list n) | |
(if (= n 0) '() (cons (read) (read-input-list (- n 1))))) | |
(define takonum (read)) | |
(define takolist (read-input-list takonum)) |
This file contains 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
import java.util.*; | |
public class Main { | |
public static void main(String[] args){ | |
Scanner sc = new Scanner(System.in); | |
int indexnum = sc.nextInt(); | |
int min = sc.nextInt(); | |
int now; |
This file contains 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
#include <cstdio> | |
int main(){ | |
int min,n,k[100]; | |
scanf("%d", &n); | |
for(int i = 0; i < n; i++){ | |
scanf("%d", &k[i]); | |
} |
This file contains 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
import java.util.*; | |
public class Main { | |
public static void main(String[] args){ | |
Scanner sc = new Scanner(System.in); | |
int indexnum = sc.nextInt(); | |
int[] indexArray; | |
indexArray = new int[indexnum]; |
This file contains 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
#include <cstdio> | |
int main(){ | |
int min,n,k[100]; | |
scanf("%d", &n); | |
for(int i = 0; i < n; i++){ | |
scanf("%d", &k[i]); | |
} |
This file contains 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
odd(X) :- X mod 2 =\= 0. | |
odd2sum1(1,1). | |
odd2sum1(N,Sum) :- odd(N), N2 is N-2,odd2sum1(N2,Sum2),Sum is Sum2 + N*N. | |
odd2sum1(N,Sum) :- N2 is N-1,odd2sum1(N2,Sum). |
This file contains 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
(define (odd n) (if (= (modulo n 2) 1) #t #f)) | |
(define (sum2 n) (if (= n 1) 1 | |
(+ (sum2 (- n 2)) (* n n)))) | |
(define (odd2sum1 n) (if (odd n) (sum2 n) | |
(sum2 (- n 1)))) |
This file contains 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
wa(N,Sum) :- M is N -1, wa(M,Sum2), Sum is Sum2 + N. | |
wa(0,0). |
NewerOlder