Language: C++

v#include<bits/stdc++.h>
#define LL long long int
#define INF 734858
using namespace std;
int main(void)
{
	LL b,ka,t,w,ki,y,m,d,sum,cnt,mon,day,year;
	LL i,j,k;
	LL maya[5]={144000,7200,360,20,1};
	LL month[2][12]={
					{31,28,31,30,31,30,31,31,30,31,30,31},
					{31,29,31,30,31,30,31,31,30,31,30,31}
					};
	char s[100];
	while(1) {
		cin>>s;
		if(s[0]=='#') break;
		cnt=0;
		for(i=0;i<strlen(s);i++) {
			if(s[i]=='.') cnt++;
		}
		if(cnt==2) { //?\?????????????
			sum=0;
			string sum2;
			sum2=s[0];
			for(i=1;i<strlen(s);i++) {
				if(s[i]=='.') break;
				else sum2+=s[i];
			}
			int mx;
			mx=atoi(sum2.c_str());
			//sum=?\????????¨? 
			for(i=1;i<mx;i++) {
				if(i%4==0&&i%100!=0||i%400==0) sum+=366;
				else sum+=365;
			}
			//?????°????¨????
			int f=0;
			for(i=0;i<strlen(s);i++) {
				if(s[i]=='.'&&s[i+2]=='.') {
					sum2=s[i+1];
					if(f==0) mon=atoi(sum2.c_str());
					else day=atoi(sum2.c_str());
					f=1;
				}
				else if(s[i]=='.'&&s[i+2]!='.') {
					sum2=s[i+1];
					sum2+=s[i+2];
					if(f==0) mon=atoi(sum2.c_str());
					else day=atoi(sum2.c_str());
					f=1;
				}
			}
			//cout<<mon<<" "<<day<<endl;
			//?????°???sum????¶?????????????????????´??¨????????§????????¨?????????????????????
			int test=0;
			for(i=0;i<mon-1;i++) {
				if(mx%4==0&&mx%100!=0||mx%400==0) sum+=month[1][i];
				else sum+=month[0][i];
			}
			//??\????????????????????§???????????§??????????????§?????\??§?¨????
			sum+=day,sum-=INF;
			b=sum/maya[0],sum=sum%maya[0],b=b%13;
			ka=sum/maya[1],sum=sum%maya[1],ka=ka%20;
			t=sum/maya[2],sum=sum%maya[2],t=t%20;
			w=sum/maya[3],ki=sum%maya[3],w=w%18,ki%20;
			//cout<<b%13<<"."<<ka%20<<"."<<t%20<<"."<<w%18<<"."<<ki%20<<endl;
			cout<<b<<"."<<ka<<"."<<t<<"."<<w<<"."<<ki<<endl;
		}
		else { //??????????\????
			sum=0;
			LL swi=1,x;
			string sum3;
			//????????????????????§???
			if(s[1]=='.') sum3=s[0],sum+=atoi(sum3.c_str())*maya[0];
			else if(s[1]!='.') sum3=s[0],sum3+=s[1],sum+=atoi(sum3.c_str())*maya[0];
			for(i=0;i<strlen(s);i++) {
				if(s[i]=='.'&&s[i+2]=='.') {
					sum3=s[i+1];
					sum+=atoi(sum3.c_str())*maya[swi];
					swi++;					
				}
				else if(s[i]=='.'&&s[i+2]!='.') {
					sum3=s[i+1],sum3+=s[i+2];
					sum+=atoi(sum3.c_str())*maya[swi];	
					swi++;		
				}
			}
		//	cout<<sum<<endl;
			int zan=10;//zan???21????£????10???????´????????????????sum?????????10???????????????
			if(sum<11) {
				cout<<"2012.12."<<sum+21<<endl;
			}
			else {
				sum-=10;
				LL suu=2013;
				while(1) {
					if(suu%4==0&&suu%100!=0||suu%400==0) {
						if(sum>366) {
							sum-=366;
						}
						else if(sum==366) {
							sum-=366;
							mon=12,day=31;
						}
						else {
							mon=1;
							for(i=0;i<12;i++) {
								if(sum>=month[1][i]) {
									if(sum-month[1][i]==0) break;
									sum-=month[1][i];
									mon++;
								}
							}
							day=sum;
							sum=0;
						}
					}
					else {
						if(sum>365) {
							sum-=365;
						}
						else if(sum==365) {
							sum-=365;
							mon=12,day=31;
						}
						else {
							mon=1;
							//cout<<"sum=="<<sum<<endl;
							for(i=0;i<12;i++) {
								if(sum>=month[0][i]) {
									if(sum-month[0][i]==0) break;
									sum-=month[0][i];
									mon++;
									//cout<<"sum=="<<sum<<endl;
								}
							}
							day=sum;
							sum=0;
						}
					}
					if(sum==0) break;
					suu++;
				}
				cout<<suu<<"."<<mon<<"."<<day<<endl;
			}
		}
	}
}
	

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include<bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:16:17: error: 'cin' was not declared in this scope
   16 |                 cin>>s;
      |                 ^~~
a.cc:19:27: error: 'strlen' was not declared in this scope
   19 |                 for(i=0;i<strlen(s);i++) {
      |                           ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | v#include<bits/stdc++.h>
a.cc:24:25: error: 'string' was not declared in this scope
   24 |                         string sum2;
      |                         ^~~~~~
a.cc:25:25: error: 'sum2' was not declared in this scope; did you mean 'sum'?
   25 |                         sum2=s[0];
      |                         ^~~~
      |                         sum
a.cc:26:35: error: 'strlen' was not declared in this scope
   26 |                         for(i=1;i<strlen(s);i++) {
      |                                   ^~~~~~
a.cc:26:35: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:31:28: error: 'atoi' was not declared in this scope
   31 |                         mx=atoi(sum2.c_str());
      |                            ^~~~
a.cc:39:35: error: 'strlen' was not declared in this scope
   39 |                         for(i=0;i<strlen(s);i++) {
      |                                   ^~~~~~
a.cc:39:35: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:68:25: error: 'cout' was not declared in this scope
   68 |                         cout<<b<<"."<<ka<<"."<<t<<"."<<w<<"."<<ki<<endl;
      |                         ^~~~
a.cc:68:68: error: 'endl' was not declared in this scope
   68 |                         cout<<b<<"."<<ka<<"."<<t<<"."<<w<<"."<<ki<<endl;
      |                                                                    ^~~~
a.cc:73:25: error: 'string' was not declared in this scope
   73 |                         string sum3;
      |                         ^~~~~~
a.cc:75:39: error: 'sum3' was not declared in this scope; did you mean 'sum'?
   75 |                         if(s[1]=='.') sum3=s[0],sum+=atoi(sum3.c_str())*maya[0];
      |                                       ^~~~
      |                                       sum
a.cc:75:54: error: 'atoi' was not declared in this scope
   75 |                         if(s[1]=='.') sum3=s[0],sum+=atoi(sum3.c_str())*maya[0];
      |                                                      ^~~~
a.cc:76:44: error: 'sum3' was not declared in this scope; did you mean 'sum'?
   76 |                         else if(s[1]!='.') sum3=s[0],sum3+=s[1],sum+=atoi(sum3.c_str())*maya[0];
      |                                            ^~~~
      |                                            sum
a.cc:76:70: error: 'atoi' was not declared in this scope
   76 |                         else if(s[1]!='.') sum3=s[0],sum3+=s[1],sum+=atoi(sum3.c_str())*maya[0];
      |                                                                      ^~~~
a.cc:77:35: error: 'strlen' was not declared in this scope
   77 |                         for(i=0;i<strlen(s);i++) {
      |                                   ^~~~~~
a.cc:77:35: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:79:41: error: 'sum3' was not declared in this scope; did you mean 'sum'?
   79 |                                         sum3=s[i+1];
      |                                         ^~~~
      |                                         sum
a.cc:80:46: error: 'atoi' was not declared in this scope
   80 |                                         sum+=atoi(sum3.c_str())*maya[swi];
      |                                              ^~~~
a.cc:84:41: error: 'sum3' was not declared in this scope; did you mean 'sum'?
   84 |                                         sum3=s[i+1],sum3+=s[i+2];
      |                                         ^~~~
      |                                         sum
a.cc:85:46: error: 'atoi' was not declared in this scope
   85 |                                         sum+=atoi(sum3.c_str())*maya[swi];
      |                                              ^~~~
a.cc:92:33: error: 'cout' was not declared in this scope
   92 |                                 cout<<"2012.12."<<sum+21<<endl;
      |                                 ^~~~
a.cc:92:59: error: 'endl' was not declared in this scope
   92 |                                 cout<<"2012.12."<<sum+21<<endl;
      |                                                           ^~~~
a.cc:145:33: error: 'cout' was not declared in this scope
  145 |                                 cout<<suu<<"."<<mon<<"."<<day<<endl;
      |                                 ^~~~
a.cc:145:64: error: 'endl' was not declared in this scope
  145 |                                 cout<<suu<<"."<<mon<<"."<<day<<endl;
      |                                                                ^~~~