Problem:


Score : 100 points

Problem Statement

Given is a string S representing the day of the week today.

S is SUN, MON, TUE, WED, THU, FRI, or SAT, for Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday, respectively.

After how many days is the next Sunday (tomorrow or later)?

Constraints

S is SUN, MON, TUE, WED, THU, FRI, or SAT.

Input

Input is given from Standard Input in the following format:

S

Output

Print the number of days before the next Sunday.

Sample Input 1

SAT

Sample Output 1

1

It is Saturday today, and tomorrow will be Sunday.

Sample Input 2

SUN

Sample Output 2

7

It is Sunday today, and seven days later, it will be Sunday again.



Sample input:
SAT


Sample output:
1

Submission status: Runtime Error

Solution code:

#include <bits/stdc++.h>

using namespace std;

#define rep(i, x)   for (__typeof(x) i = 0; i < x; i++)
#define mp             make_pair
#define pb             push_back
#define fi             first
#define se             second
#define sz(x)          (int)((x).size())
#define all(x)         (x).begin(), (x).end()
#define sci(x)         int x;       scanf("%d", &x);
#define scii(x, y)     int x, y;    scanf("%d %d", &x, &y);
#define sciii(x, y, z) int x, y, z; scanf("%d %d %d", &x, &y, &z);
#define TC(x)          sci(x); while(x --)
#define eprintf(...)   fprintf(stderr, __VA_ARGS__)
#define debug(x)       { cerr << #x << " = " << x << endl; }
#define repi(i, x)  for (__typeof(x) i = x-1; i >= 0; i --)
#define fore(itr, x)   for (__typeof(x.begin()) itr = x.begin(); itr != x.end(); itr ++)
#define forei(itr, x)  for (__typeof(x.end()) itr = x.end() - 1; itr != x.begin() - 1; itr --)
typedef long long      ll;
typedef pair<int, int> ii;
typedef pair<ii, int>  iii;
typedef vector<int>    vi;
typedef vector<ii>     vii;
typedef vector<iii>    viii;
typedef vector<vector<int> > vvi;
typedef pair<ll, ll>   pairl;
typedef vector<ll>     vl;
typedef vector<ll>     vll;
typedef vector<vector<ll> > vvl;
const   int            infi = numeric_limits<int>::max();
const   ll             infl = numeric_limits<ll>::max();
const   double         eps = 0;
const   int            ms  = 0;



int main()
{
    ios::sync_with_stdio(false);//endl->"\n"
    cin.tie(0);
    string s;
    cin >> s;
    string a[] = {"SUN", "MON" , "TUE", "WED", "THU", "FRI", "SAT"};
    for(int i = 1; i <= 6; i++){
        if(s == a[i]){
            cout << 7-i << endl;
            return 0;
        }
    }
    cout << 7 << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
s = input()

all = ['SUN','MON','TUE','WED','THU','FRI','SAT']


for i range(7):
	if all[i] == s:
		c = i
        
print(7-i)

Submission status: Runtime Error

Solution code:
S=input()
if S=='SUN':
    print(7)
elif S=='MON':
    print(6)
elif S=='TUE':
    print(5)
elif S=='WED':
    print(4)
elif S=='THU':
    print(3)
elif S=='FRI':
    print(2)
elif S=='SAT'
print(1)

Submission status: Runtime Error

Solution code:
s = input()
if s = 'SUN':
  print(7)
elif s = 'SAT':
  print(1)
elif s = 'MON':
  print(6)
elif s = 'TUE':
  print(5)
elif s=  'WED':
  print(4)
elif s = 'THU':
  print(3)
elif s = 'FRI':
  print(2)

Submission status: Runtime Error

Solution code:
a = str(input())

if a == "SUN":
  print("7")
elif a == "MON":
  print("6")
elif a == "TUE":
  print("5")
elif a == "WED":
  print("4")
elif a == "THU":
  print("3")
elif a == "FRI":
  print("2")
else:
  print("1")

SUN,MON,TUE,WED,THU,FRI,SAT

Submission status: Runtime Error

Solution code:
S = input()
if S = 'SUN':
    print(7)
elif S = 'MON':
    print(6)
elif S = 'TUE':
    print(5)
elif S = 'WED':
    print(4)
elif S = 'THU':
    print(3)
elif S = 'FRI':
    print(2)
else:
    print(1)

Submission status: Runtime Error

Solution code:
#include  <stdio.h>
#include <string.h>

int main(void) {
    char s[4];
    scanf("%s",s);
    if(strcmp(s, "SUN") == 0)printf("%d\n", 7);
    else if(strcmp(s, "MON") == 0) printf("%d\n", 6);
    else if(strcmp(s, "TUE") == 0) printf("%d\n", 5);
    else if(strcmp(s, "WED") == 0) printf("%d\n", 4);
    else if(strcmp(s, "THU") == 0) printf("%d\n", 3);
    else if(strcmp(s, "FRI") == 0) printf("%d\n", 2);
    else if(strcmp(s, "SAT") == 0) printf("%d\n", 1);
    return 0;
}

Submission status: Runtime Error

Solution code:
s = input()
if s=='SUN':
  print(7)
elif s='MON':
  print(6)
elif s=='TUE':
  print(5)
elif s=='WED':
  print(4)
elif s=='THU':
  print(3)
elif s=='FRI':
  print(2)
elif s=='SAT':
  print(1)

Submission status: Runtime Error

Solution code:
s = input()
x = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7-x.find(s))

Submission status: Runtime Error

Solution code:
l =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
S = str(input())

print(int(7 - S.index()))l =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
S = str(input())

print(int(7 - l.index(S)))

Submission status: Runtime Error

Solution code:
s = int(input())
if s == 'SAT':
    print(1)
if s == 'FRI':
    print(2)
if s == 'THU':
    print(3)
if s == 'WED':
    print(4)
if s == 'TUE':
    print(5)
if s == 'MON':
    print(6)
if s == 'SUN':
    print(7)

Submission status: Runtime Error

Solution code:
S=input()
if S='SUN':
    print(7)
elif S='MON':
    print(6)
elif S='TUE':
    print(5)
elif S='WED':
    print(4)
elif S='THU':
    print(3)
elif S='FRI':
    print(2)
elif S='SAT'
print(1)

Submission status: Runtime Error

Solution code:
S = input()

if S = 'SUN':
  print(7)
elif S = 'MON':
  print(6)
elif S = 'TUE':
  print(5)
elif S = 'WED':
  print(4)
elif S = 'THU':
  print(3)
elif S = 'FRI':
  print(2)
elif S = 'SAT':
  print(1)

Submission status: Runtime Error

Solution code:
s = input()
if s=="SUN":
  print(7)
elif s=="MON":
  print(6)
elif s=="TUE":
  print(5)
else s=="WED":
  print(4)
else s=="THU":
  print(3)
else s=="FRI":
  print(2)
else s=="SAT":
  print(1)

Submission status: Runtime Error

Solution code:
s = input()


if s=='SUN':
    ans = 7
elif s=='MON':
    ans = 6
elif s=='TUE':
    ans = 5
elif s=='TWED':
    ans = 4
elif s=='THU':
    ans = 3
elif s=='FRI':
    ans = 2
elif s=='SAT':
    ans = 1

print(ans)

Submission status: Runtime Error

Solution code:
s = input()
if s='SUN':
  print(7)
elif s='MON':
  print(6)
elif s='TUE':
  print(5)
elif s='WED':
  print(4)
elif s='THU':
  print(3)
elif s='FRI':
  print(2)
elif s='SAT':
  print(1)

Submission status: Runtime Error

Solution code:
S = input()

week = ["SUN","MOM","TUE","WED","THU","FRI","SAT"]

print(len(week)-week.index(S))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

l=["SUN","MON","TUE","WED","THU","FRI","SAT"]
s=input()
print(7-l.index(s))

Submission status: Runtime Error

Solution code:
S = input()
if S == 'SUN':
    print(7)
elif S = 'MON':
    print(6)
elif S = 'TUE':
    print(5)
elif S = 'WED':
    print(4)
elif S = 'THU':
    print(3)
elif S = 'FRI':
    print(2)
else:
    print(1)

Submission status: Runtime Error

Solution code:
S = input()
if S = "SUN":
    print(7)
if S = "MON":
    print(6)
if S = "TUE":
    print(5)
if S = "WED":
    print(4)
if S = "THU":
    print(3)
if S = "FRI":
    print(2)
if S = "SAT":
    print(1)

Submission status: Runtime Error

Solution code:
s = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
print(7 - index(S))

Submission status: Runtime Error

Solution code:
l={"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(s[input()])

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <iomanip>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <stack>
#include <queue>
#include <bitset>
#include <numeric>
#include <cassert>
#include <random>
#ifdef DEBUG
#include "./Lib/debug.hpp"
#include "./Lib/Timer.hpp"
#include "./Lib/sample.hpp"
#else
#define dump(...)
template<class T>inline auto d_val(T a, T b) { return a; }
#endif

/* (=＾o＾=) */
#define int ll

/* macro */
#define FOR(i, b, e) for(ll i = (ll)(b); i < (ll)(e); ++i)
#define RFOR(i, b, e) for(ll i = (ll)(e-1); i >= (ll)(b); --i)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define REPC(x,c) for(const auto& x:(c))
#define REPI2(it,b,e) for(auto it = (b); it != (e); ++it)
#define REPI(it,c) REPI2(it, (c).begin(), (c).end())
#define RREPI(it,c) REPI2(it, (c).rbegin(), (c).rend())
#define REPI_ERACE2(it, b, e) for(auto it = (b); it != (e);)
#define REPI_ERACE(it, c) REPI_ERACE2(it, (c).begin(), (c).end())
#define ALL(x) (x).begin(),(x).end()
#define cauto const auto&
/* macro func */
#define SORT(x) do{sort(ALL(x));}while(false)
#define RSORT(x) do{sort((x).rbegin(),(x).rend());}while(false)
#define UNIQUE(v) do{v.erase( unique(v.begin(), v.end()), v.end() );}while(false)
#define MAX(x,y) do{x = std::max(x,y);}while(false)
#define MIN(x,y) do{x = std::min(x,y);}while(false)
#define BR do{cout<<"\n";}while(false)

/* type define */
using ll = long long;
using PAIR = std::pair<ll, ll>;
using VS = std::vector<std::string>;
using VL = std::vector<long long>;
using VVL = std::vector<VL>;
using VVVL = std::vector<VVL>;
using VD = std::vector<double>;
template<class T>
using V = std::vector<T>;

/* using std */
using std::cout;
constexpr char endl = '\n';
using std::cin;
using std::sort;
using std::pair;
using std::string;
using std::stack;
using std::queue;
using std::vector;
using std::list;
using std::map;
using std::unordered_map;
using std::multimap;
using std::unordered_multimap;
using std::set;
using std::unordered_set;
using std::unordered_multiset;
using std::multiset;
using std::bitset;
using std::priority_queue;

/* constant value */
constexpr ll MOD = 1000000007;
//constexpr ll MOD = 998244353;

/* Initial processing  */
struct Preprocessing { Preprocessing() { std::cin.tie(0); std::ios::sync_with_stdio(0); }; }_Preprocessing;

/* Remove the source of the bug */
signed pow(signed, signed) { assert(false); return -1; }

/* define hash */
namespace std { template <>	class hash<std::pair<ll, ll>> { public:	size_t operator()(const std::pair<ll, ll>& x) const { return hash<ll>()(1000000000 * x.first + x.second); } }; }

/* input */
template<class T> std::istream& operator >> (std::istream& is, vector<T>& vec) { for (T& x : vec) is >> x; return is; }

//=============================================================================================

signed main() {

	VS vs = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
	string s;
	cin >> s;

	REP(i, 7) {
		if (s == vs[i]) {
			cout << 7 - i << endl;
			return 0;
		}
	}

}