Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
	"time"
)

var sc = bufio.NewScanner(os.Stdin)

//Sliceconvtoi ...
func Sliceconvtoi() []int {
	strs := strings.Split(sc.Text(), " ")

	var ints []int
	var x int

	for _, s := range strs {
		x, _ = strconv.Atoi(s)
		ints = append(ints, x)
	}

	return ints
}

func main() {
	for sc.Scan() {
		var dt string
		i := Sliceconvtoi()
		t := time.Date(2017, 9, i[0], 0, 0, 0, 0, time.Local)

		switch t.Weekday() {
		case time.Monday:
			dt = "mon"
		case time.Tuesday:
			dt = "tue"
		case time.Wednesday:
			dt = "wed"
		case time.Thursday:
			dt = "thu"
		case time.Friday:
			dt = "fri"
		case time.Saturday:
			dt = "sat"
		case time.Sunday:
			dt = "sun"
		default:
		}

		fmt.Println(dt)
	}

}

C++: #include<bits/stdc++.h>
using namespace std;

#define int long long

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

string s[]={"sun","mon","tue","wed","thu","fri","sat"};

signed main(){
    int x;cin>>x;
    int k=(6+x-9+7*114514)%7;
    cout<<s[k]<<endl;
    return 0;
}

C++: #include<iostream>
using namespace std;

int main(void){
	int d;
	cin >> d;
	if(d%7 == 2) cout << "sat";
	else if(d%7 == 3) cout << "sun";
	else if(d%7 == 4) cout << "mon";
	else if(d%7 == 5) cout << "tue";
	else if(d%7 == 6) cout << "wed";
	else if(d%7 == 0) cout << "thu";
	else cout << "fri";
	cout << endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
    int X;
    cin >> X;
    int x =X%7;
    string day[]={"thu","fri","sat","sun","mon","tue","wed"};
    for(int i=0;i<7;i++){
        if(i==x){
            cout << day[i]<<endl;
            break;
        }
    }
}

C++: #include <iostream>
using namespace std;
int main(void){
      string D[] = {"thu", "fri", "sat", "sun", "mon", "tue", "wed"};
  int x; cin >> x;
  cout << D[x%7] << endl;
    
}

C++: # include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
using namespace std;
using LL = long long;
constexpr long long MOD = 1000000000 + 7;
constexpr long long INF = 1000000000;
const double PI = acos(-1);

int main() {
	int n;
	cin >> n;
	if (n % 7 == 0)cout << "thu" << endl;
	if (n % 7 == 1)cout << "fri" << endl;
	if (n % 7 == 2)cout << "sat" << endl;
	if (n % 7 == 3)cout << "sun" << endl;
	if (n % 7 == 4)cout << "mon" << endl;
	if (n % 7 == 5)cout << "tue" << endl;
	if (n % 7 == 6)cout << "wed" << endl;
}

C++: #include<stdio.h>
int main(void)
{
	int x;
	scanf("%d",&x);
	if(x==1||x==8||x==15||x==22||x==29){
	printf("fri\n");
	}
	else	if(x==2||x==9||x==16||x==23||x==30){
	printf("sat\n");
	}
	else	if(x==3||x==10||x==17||x==24){
	printf("sun\n");
	}
	else	if(x==4||x==11||x==18||x==25){
	printf("mon\n");
	}
	else	if(x==5||x==12||x==19||x==26){
	printf("tue\n");
	}
	else	if(x==6||x==13||x==20||x==27){
	printf("wed\n");
	}
	else	{
	printf("thu\n");
	}
	return 0;
	}

C++: #include <iostream>
#include <string>
using namespace std;

int main(){
    int x;
    cin >> x;
    string week;

    switch(x % 7){
        case 0: week = "thu"; break;
        case 1: week = "fri"; break;
        case 2: week = "sat"; break;
        case 3: week = "san"; break;
        case 4: week = "mon"; break;
        case 5: week = "tue"; break;
        default: week = "wed"; break;
    }
    cout << week << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
   int x;
   cin>>x;
   if(x%7==1){
       cout<<"fri"<<endl;
   }
   else if(x%7==2){
       cout<<"sat"<<endl;
   }
   else if(x%7==3){
       cout<<"sun"<<endl;
   }
   else if(x%7==4){
       cout<<"mon"<<endl;
   }
   else if(x%7==5){
       cout<<"tue"<<endl;
   }
    else if(x%7==6){
        cout<<"wed"<<endl;
    }
    else if(x%7==0){
        cout<<"thu"<<endl;
    }
}

C++: #include <iostream>
using namespace std;

int main(){
    int x;
    cin>>x;
    switch(x%7){
        case 0:cout<<"thu"<<endl; break;
        case 1:cout<<"fri"<<endl; break;
        case 2:cout<<"sat"<<endl; break;
        case 3:cout<<"sun"<<endl; break;
        case 4:cout<<"mon"<<endl; break;
        case 5:cout<<"tue"<<endl; break;
        case 6:cout<<"wed"<<endl; break;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;

int main(){

  int x;
  string s[7]={"thu","fri","sat","sun","mon","tue","wed"};

  cin>>x;

  cout<<s[x%7]<<endl;

  return 0;
}

C++: #include <stdio.h>
int main(void){
	int m,f,b;
	scanf("%d %d %d",&m,&f,&b);
	if(b<m){
		printf("0\n");
	}else if((m+f)<b){
		printf("NA\n");
	}else{
		printf("%d\n",b-m);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
   int a,b;
   cin>>a;
   b=a%7;
   if(b==2){cout<<"sat"<<endl;}
   if(b==3){cout<<"sun"<<endl;}
   if(b==4){cout<<"mon"<<endl;}
   if(b==5){cout<<"tue"<<endl;}
   if(b==6){cout<<"wed"<<endl;}
   if(b==0){cout<<"thu"<<endl;}
   if(b==1){cout<<"fri"<<endl;}
}

C++: #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(a) a.begin(), a.end()
#define mod 1000000007
#define MOD 998244353
#define INF 40000000000000000
int dx8[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
int dy8[8] = {1, 1, 1, 0, -1, -1, -1, 0};
int dx4[4] = {-1, 0, 1, 0};
int dy4[4] = {0, -1, 0, 1};
template <class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return 1;
    }
    return 0;
}
int sum(int n){
    int res=0;
    while(n>0){
        res+=n%10;
        n/=10;
    }
    return res;
}
signed main() {
    int X;cin>>X;
    X%=7;
    vector<string>Ans(7);
    Ans={"thu","fri","sat","sun","mon","tue","wed"};
    cout<<Ans[X]<<endl;
}

C++: #include <stdio.h>

int main(void) {

	int a , d;

	scanf("%d", &a);
	
	d = a % 7;

	if (d == 1) {
		printf("fri\n");
	}
	else if (d == 2) {
		printf("sat\n");
	}
	else if (d == 3) {
		printf("sun\n");
	}
	else if (d == 4) {
		printf("mon\n");
	}
	else if (d == 5) {
		printf("tue\n");
	}
	else if (d == 6) {
		printf("wed\n");
	}
	else {
		printf("thu\n");
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a,b;
    cin>>a;
    b=a%7;
    if(b==0){
        cout<<"thu"<<endl;
    }
    else if(b==1){
        cout<<"fri"<<endl;
    }
    else if(b==2){
        cout<<"sat"<<endl;
    }
    else if(b==3){
        cout<<"sun"<<endl;
    }
    else if(b==4){
        cout<<"mon"<<endl;
    }
    else if(b==5){
        cout<<"tue"<<endl;
    }
    else if(b==6){
        cout<<"wed"<<endl;
    }
    return 0;
}

C++: #include <iostream>
using namespace std;

int main()
{
        int x;
        int n;

    cin >>x;

    n = x % 7

    if(n==0){

        cout << "sun" << endl;
    }
    else{

    }
    
    system("pause");
    return 0;
}