acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • ok啊好吧

    #include <iostream> #include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; int x = a % 7; for(int i = 1; i < b; i++){ x = a % 7*x%7; } if(x % 7 == 0) cout << "Sunday"; if(x % 7 == 1) cout << "Monday"; if(x % 7 == 2) cout << "Tuesday"; if(x % 7 == 3) cout << "Wednesday"; if(x % 7 == 4) cout << "Thursday"; if(x % 7 == 5) cout << "Friday"; if(x % 7 == 6) cout << "Saturday"; return 0; }

    userId_undefined

    alrwool212

    出道萌新秩序白银循环·循环打卡人格式·格式排版员I/O·IO入门者
    22阅读
    0回复
    1点赞
  • 题解

    userId_undefined

    zsy

    7月全勤卷王题解仙人出道萌新时间刺客时空双修者秩序白银
    10阅读
    0回复
    1点赞
  • 题解 100% AC

    userId_undefined

    飞的智动

    题解仙人时空双修者模拟·模拟练习生7月全勤卷王秩序白银快乐小狗
    5阅读
    0回复
    1点赞
  • 简简单单 的 题解

    userId_undefined

    ༺ཌༀ™☯追光·少年☯™ༀད༻

    出道萌新时空双修者倔强青铜字符串·魔法使循环·循环打卡人格式·格式排版员
    5阅读
    0回复
    1点赞
  • 题解

    题解 #include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; int x = a % 7; for(int i = 1; i < b; i++){ x = a % 7*x%7; } if(x % 7 == 0) cout << "Sunday"; if(x % 7 == 1) cout << "Monday"; if(x % 7 == 2) cout << "Tuesday"; if(x % 7 == 3) cout << "Wednesday"; if(x % 7 == 4) cout << "Thursday"; if(x % 7 == 5) cout << "Friday"; if(x % 7 == 6) cout << "Saturday"; return 0; }

    userId_undefined

    弜

    5阅读
    0回复
    0点赞
  • case

    由于数值较大肯定不能直接算,一周是七天,只要对7取模即可

    userId_undefined

    ‮༺དༀ༒∞░∞༒ༀཌ༻

    小有名气时空双修者7月全勤卷王题解仙人秩序白银GESP1级
    3阅读
    0回复
    0点赞
首页