Language: C

//Date:06-01-17
 
#include<stdio.h>
#include<string.h>
#include<assert.h>
#include<stdlib.h>
#include<stdbool.h>
#include<float.h>
#include<math.h>
#include<ctype.h>
#include<limits.h>
#include<time.h>
#define ll long long
#define For(i,n)	for(i=0;i<n;i++)
#define rep(i ,a ,b)	for(i=(a);i<=(b);i++)
#define mset(a ,value)	memset(a ,value ,sizeof(a))
#define s(a)	scanf("%d" ,&a);
#define ls(a)	scanf("%ld" ,&a)
#define reg(i)	register int i
#define infinite INT_MAX
#define MAX 100005
#define NIL -1
int min(int a,int b){	return (a<b?a:b);	}
int max(int a,int b){	return (a>b?a:b);	}
main(){
	int sx ,sy ,tx ,ty;
	scanf("%d%d%d%d" ,&sx ,&sy ,&tx ,&ty);
	int x=sx ,y = sy;
	while(y!=ty){	printf("U");	y++;	}
	while(x!=tx){	printf("R");	x++;	}
	while(y!=sy){	printf("D");	y--;	}
	while(x!=sx){	printf("L");	x--;	}
	printf("L");	x--;
	while(y!=(ty+1)){	printf("U");	y++;	}
	while(x!=tx){	printf("R");	x++;	}
	printf("D");	y--;
	printf("R");	x++;
	while(y!=(sy-1)){	printf("D");	y--;}
	while(x!=sx){	printf("L");	x--;	}
	printf("U");	y++;
	assert((x==sx)&&(y==sy));
	return 0;
}

	int k ,s ,x ,y ,z ,c=0;
	scanf("%d %d" ,&k ,&s);
	rep(x ,0 ,k)
		rep(y ,0 ,k){
				z = s-(x+y);
				if(z>=0&&z<=k)	c++;
	}
	printf("%d" ,c);
	return 0;
}

Compiler output:
main.c:25:1: error: return type defaults to 'int' [-Wimplicit-int]
   25 | main(){
      | ^~~~
main.c:46:15: error: expected declaration specifiers or '...' before string constant
   46 |         scanf("%d %d" ,&k ,&s);
      |               ^~~~~~~
main.c:46:24: error: expected declaration specifiers or '...' before '&' token
   46 |         scanf("%d %d" ,&k ,&s);
      |                        ^
main.c:46:28: error: expected declaration specifiers or '...' before '&' token
   46 |         scanf("%d %d" ,&k ,&s);
      |                            ^
main.c:15:25: error: expected identifier or '(' before 'for'
   15 | #define rep(i ,a ,b)    for(i=(a);i<=(b);i++)
      |                         ^~~
main.c:47:9: note: in expansion of macro 'rep'
   47 |         rep(x ,0 ,k)
      |         ^~~
main.c:15:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   15 | #define rep(i ,a ,b)    for(i=(a);i<=(b);i++)
      |                                    ^~
main.c:47:9: note: in expansion of macro 'rep'
   47 |         rep(x ,0 ,k)
      |         ^~~
main.c:15:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   15 | #define rep(i ,a ,b)    for(i=(a);i<=(b);i++)
      |                                           ^~
main.c:47:9: note: in expansion of macro 'rep'
   47 |         rep(x ,0 ,k)
      |         ^~~
main.c:15:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   15 | #define rep(i ,a ,b)    for(i=(a);i<=(b);i++)
      |                                    ^~
main.c:48:17: note: in expansion of macro 'rep'
   48 |                 rep(y ,0 ,k){
      |                 ^~~
main.c:15:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   15 | #define rep(i ,a ,b)    for(i=(a);i<=(b);i++)
      |                                           ^~
main.c:48:17: note: in expansion of macro 'rep'
   48 |                 rep(y ,0 ,k){
      |                 ^~~
main.c:52:16: error: expected declaration specifiers or '...' before string constant
   52 |         printf("%d" ,c);
      |                ^~~~
main.c:52:22: error: expected declaration specifiers or '...' before 'c'
   52 |         printf("%d" ,c);
      |                      ^
main.c:53:9: error: expected identifier or '(' before 'return'
   53 |         return 0;
      |         ^~~~~~
main.c:54:1: error: expected identifier or '(' before '}' token
   54 | }
      | ^