题解 | #开学?#

开学?

https://www.nowcoder.com/practice/9cc35bd0754f4feca18e10e57c672467

#include <stdio.h>

int main() {
    int X, N ;
    scanf("%d %d" , &X , &N) ;
    int result = X + N;
    if (result % 7 == 0){
        printf("7") ;
    }else {
        printf("%d" , result % 7) ;
    }
    return 0;
}

取余的思路

全部评论

相关推荐

完美的潜伏者许愿简历通过:我上表jd,请求封我做后端大将军的事,北京有消息了:竟然不许!!! 他们一定是看我没有实习,这才故意驳回我的请求!
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务