Go: package main

import "fmt"

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

	var day int
	fmt.Scan(&day)
	dayOfWeek := -1
	for i := 0; i < day; i++ {
		if dayOfWeek == 6 {
			dayOfWeek = -1
		}
		dayOfWeek++
	}
	fmt.Println(week[dayOfWeek])
}

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

C++: #include<iostream>
#include<vector>
#include<cmath>
#define _GLIBCXX_DEBUG
using namespace std;

int main(void)
{
  int X;
  cin>>X;
  vector<string> data(X+1);
  for(int i=1;i<=X;i++){
    if(i%7==1) data[i]="fri";
    else if(i%7==2) data[i]="sat";
    else if(i%7==3) data[i]="sun";
    else if(i%7==4) data[i]="mon";
    else if(i%7==5) data[i]="tue";
    else if(i%7==6) data[i]="wed";
    else if(i%7==0) data[i]="thu";
  }
  cout<<data[X]<<endl;
  return 0;
}

C++: #include<iostream>
using namespace std ;
int main()
{
	int X=0 ;
	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 <stdio.h>
 
const char* dates[7] = { "sat", "sun", "mon", "tue", "wed", "thu", "fri" };
 
int main(void) {
  int date;
  scanf("%d", &date);
  printf("%s\n", dates[(((date - 9) % 7) + 7) % 7]);
  return 0;
}

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

int main()
{
	int x;
	cin >>x;
	if ( x = 1,8,15,22,29)cout <<"fti";
	if ( x = 2,9,16,23,30)cout << "sat";
	if ( x = 3,10,17,24)cout <<"sun";
	if ( x = 4,11,18,25)cout <<"mon";
	if (x=5,12,19,26)cout <<"tue";
	if (x = 6,13,20,27)cout<<"wed";
	if ( x = 7,14,21,28)cout << "thu";
	cout <<endl;
	return 0 ;
}

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

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

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

#define ASC(vec) vec.begin(), vec.end()    // 昇順ソート 例：sort(ASC(vec));
#define DESC(vec) vec.rbegin(), vec.rend() // 降順ソート 例：sort(DESC(vec));
#define rep(i, n) for (int i = 0; i < (n); i++)
#define Rep(i, n) for (int i = 1; i < n; i++)
#define REP(i, vec) for (auto i = vec.begin(); i != vec.end(); ++i)

const int       mod = 1000000007;
const int       inf = (1 << 21);
const long long INF = 1LL << 60;

using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vb = vector<bool>;
using vl = vector<ll>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vvb = vector<vector<bool>>;
using vii = vector<pair<int, int>>;
using vll = vector<pair<ll, ll>>;

template<class T>
inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T>
inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T>
T GCD(T a, T b) { if (b == 0) return a; else return GCD(b, a % b); }
template<class T>
T LCM(T a, T b) { return a / GCD(a, b) * b; }

constexpr array<int, 9> dx = { 0, 1, 0, -1, -1, 1, 1, -1, 0 };
constexpr array<int, 9> dy = { 1, 0, -1, 0, 1, 1, -1, -1, 0 };

// ──────────────────────────────────────────────────────────────────

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

	vs s = { "thu", "fri", "sat", "sun", "mon", "tue", "wed" };

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

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

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	int x,a;
	cin >> x;
	a =(x-9)%7;

	if(a == 0)cout << "sat" << endl;
	if(a == 1)cout << "sun" << endl;
	if(a == 2)cout << "mon" << endl;
	if(a == 3)cout << "tue" << endl;
	if(a == 4)cout << "wed" << endl;
	if(a == 5)cout << "thu" << endl;
	if(a == 6)cout << "fri" << endl;

	return 0;
}

C++: // 2017/09/21 Tazoe

#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()
{
	char week[8][20] = { { "thu" },{ "fri" },{ "sat" },{ "sun" },{ "mon" },{ "tue" },{ "wed" } };

	int day;

	cin >> day;

	cout << week[day % 7] << endl;
}

C++: #include <iostream>

int main()
{
    int X;
    std::cin >> X;
    constexpr int N = 7;
    const std::string d[N] = {
        "mon",
        "tue",
        "wed",
        "thu",
        "fri",
        "sat",
        "sun"
    };

    int p = 5;
    if (X <= 9) {
        for (int i = 9; i > X; i--) {
            p = (p - 1 + N) % N;
        }
    } else {
        for (int i = 9; i < X; i++) {
            p = (p + 1) % N;
        }
    }

    std::cout << d[p] << std::endl;
    return 0;
}

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

main(){
  string D[] = {"thu", "fri", "sat", "sun", "mon", "tue", "wed"};
  int x; cin >> x;
  cout << D[x%7] << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;


int main() {
  vector<string> s={"sat","sun","mon","tue","wed","thu","fri"};
  int x;
  cin >> x;
  cout << s[(x-9+14)%7] << endl;
}

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

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

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

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

    int s = abs(x-9);
    s = s%7;

    if(x>=9){
        cout << dow[s] << endl;
    }else{
        if(s==0){
            cout << dow[0] << endl;
        }else{
            cout << dow[7-s] << 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 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;
}