結果

問題 No.8115 What day of week is it in N days?
ユーザー mint
提出日時 2025-04-01 22:49:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 411 bytes
コンパイル時間 2,003 ms
コンパイル使用メモリ 192,696 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-04-01 22:49:44
合計ジャッジ時間 2,911 ms
ジャッジサーバーID
(参考情報)
judge6 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n; cin >> n;
  int z = n%7;
  string s;
  if(z == 1) s = "Wednesday";
  else if(z == 2) s = "Thursday";
  else if(z == 3) s = "Friday";
  else if(z == 4) s = "Saturday";
  else if(z == 5) s = "Sunday";
  else if(z == 6) s = "Monday";
  else if(z == 0) s = "Tuesday";
  cout << s << '\n';
  return 0;
}
0