哪里错了这道题问了一个多月了还是八十分。。。

P6188 [NOI Online #1 入门组] 文具订购

bird_秒切橙题 @ 2020-05-24 11:37:59

#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
    if(n==0)
    {
        cout<<"0 0 0";
    }
    if(n<=2||n==5)
    {
        cout<<-1;
        return 0;
    }
    int a=n/14;
    n%=14;
    int b=a,c=a;
    if(n%3==1){
        b++;
        c+=n/3-1;
    }
    else if(n%3==2){
        b+=2;
        c+=n/3-2;
    }
    else
        c+=n/3;
    cout<<a<<" "<<b<<" "<<c;
    return 0;
}

by Alarm5854 @ 2020-06-26 18:48:35

白内障,看不清,高锰酸钾滴眼睛!


by liujiageng @ 2020-06-27 18:33:40

考古


by k3v1n070828 @ 2020-06-29 14:47:51

考古


by 神贴搬运工 @ 2020-08-10 13:01:29

烤咕


by MilkyCoffee @ 2020-08-18 17:46:46

kg


by Yusani_huh @ 2020-12-13 20:56:42

神贴考古


by CGDGAD @ 2021-02-08 10:50:21

2021 第一铲


by zhy137036 @ 2021-02-08 11:08:43

2021 第二铲


by siyue @ 2021-02-17 10:09:30

2021 第三铲


by 我不是智子酱 @ 2021-02-17 21:41:27

2021 第四铲


上一页 | 下一页