Skip to content

Instantly share code, notes, and snippets.

@TheoKlein
TheoKlein / ZeroJudge d065.cpp
Created September 19, 2015 11:38
ZeroJudge d065
#include <stdio.h>
int main() {
int a,b,c,max;
while (scanf ("%d%d%d",&a,&b,&c) != EOF){
if (a > b){
max = a;
}else{
max = b;
}
@TheoKlein
TheoKlein / ZeroJudge d068.cpp
Created September 19, 2015 11:40
ZeroJudge d068
#include <stdio.h>
int main() {
int n;
scanf ("%d",&n);
while (n > 50){
printf ("%d\n",n - 1);
break;
}
while (n <= 50){
@TheoKlein
TheoKlein / ZeroJudge d460.cpp
Created September 19, 2015 11:41
ZeroJudge d460
#include <stdio.h>
int main() {
int n;
scanf ("%d",&n);
printf ("%d\n",(n >= 0)*(n <= 5) * 0
+ (n >= 6)*(n <= 11) * 590
+ (n >= 12)*(n <= 17) * 790
+ (n >= 18)*(n <= 59) * 890
+ (n >= 60) * 399);
@TheoKlein
TheoKlein / ZeroJudge d483.cpp
Created September 19, 2015 11:43
ZeroJudge d483
#include <stdio.h>
int main(int argc, const char * argv[]) {
printf("hello, world\n");
return 0;
}
@TheoKlein
TheoKlein / ZeroJudge d827.cpp
Created September 19, 2015 11:44
ZeroJudge d827
#include <stdio.h>
int main() {
int n;
int doz,single;
scanf ("%d",&n);
doz = (n / 12)*50;
single = (n % 12)*5;
printf ("%d\n",doz+single);
@TheoKlein
TheoKlein / ZeroJudge a012.cpp
Created September 19, 2015 12:08
ZeroJudge a012
#include <stdio.h>
int main() {
long long int a,b;
while (scanf ("%lld%lld",&a,&b) != EOF){
if (a > b){
long long int temp = b;
b = a;
a = temp;
}
@TheoKlein
TheoKlein / ZeroJudge c039.cpp
Created September 19, 2015 12:11
ZeroJudge c039
#include <stdio.h>
int main(){
int i,j;
while (scanf("%d%d",&i,&j) != EOF){
int ni = i;
int nj = j;
if ( i > j ) {
@TheoKlein
TheoKlein / ZeroJudge d143.cpp
Created September 19, 2015 12:13
ZeroJudge d143
#include <stdio.h>
int main() {
int n;
int a,b;
scanf ("%d",&n);
for (int i = 0 ; i < n ; i++){
scanf("%d%d",&a,&b);
if (a > b){
printf (">\n");
@TheoKlein
TheoKlein / ZeroJudge a058.cpp
Last active February 27, 2016 08:29
ZeroJudge a058
#include <stdio.h>
int main(int argc, const char * argv[]) {
int n,num;
int first = 0;
int second = 0;
int third = 0;
scanf ("%d",&n);
for (int i = 0 ; i < n ; i++){
@TheoKlein
TheoKlein / ZeroJudge d074.cpp
Created September 20, 2015 02:08
ZeroJudge d074
#include <stdio.h>
int main(int argc, const char * argv[]) {
int n,num;
int max = 0;
scanf ("%d",&n);
for (int i = 0 ; i < n ; i++){
scanf("%d",&num);
if (num > max){
max = num;