Go: package main

import "fmt"

func main() {
	week := []string{"sun", "mon", "tue", "wed", "thu", "fri", "sat"}

	var day int
	fmt.Scan(&day)
	fmt.Println(week[(day+4)%7])//土曜日が9日という基準に揃えるために+4
}

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;
}

C++: #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define INF 1<<30
#define LINF 1LL<<60

/*
<url:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0359>
?????????============================================================
 ??????????????´???????????\???????????\??§????????????????????´??????????????\???????????\??§???????????????
 
 ??????????????´???????????\??????????????????????????¨??????????????\???????????\?????±?????????????????°????????????????????????
 
 ?????????????????\????????\???????????????????????????
 ????????????
 ????????\??? "mon"???????????\???"tue"????°´?????\??? "wed"?????¨?????\??? "thu"???
 ????????\??? "fri"???????????\??? "sat"?????\?????\??? "sun" ??¨???????????????
 

=================================================================

?§£??¬=============================================================
hai
================================================================
*/

string youbi[7] = {"fri","sat","sun","mon","tue","wed","thu"};
int main(void) {
	cin.tie(0); ios::sync_with_stdio(false);
    int X; cin >> X;
    cout << youbi[(X-1)%7] << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int x; cin >> x;
	switch (x%7){
	case 2:
		cout << "sat\n"; break;
	case 3:
		cout << "sun\n"; break;
	case 4:
		cout << "mon\n"; break;
	case 5:
		cout << "tue\n"; break;
	case 6:
		cout << "wed\n"; break;
	case 0:
		cout << "thu\n"; break;
	case 1:
		cout << "fri\n"; break;
	default: break;
	}
}