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 donghanwen1225 @ 2020-05-24 11:43:37
开个三重循环,一个枚举n/14到0,一个枚举a,一个枚举b,c可以算出来
by bird_秒切橙题 @ 2020-05-24 11:43:43
我秒切橙题是对的!
这但是不是橙题啊!
by critnos @ 2020-05-24 11:43:57
@small_bird @M652
by Malody @ 2020-05-24 11:43:58
@small_bird orz
by _5011_ @ 2020-05-24 11:43:58
@FZzzz fz 闭着眼睛都能写出 P5066,真是太强了Orzzzzzzzzzzzzzzzzzzzz
by k3v1n070828 @ 2020-05-24 11:43:59
by zhy137036 @ 2020-05-24 11:44:13
白内障,看不清,【数据删除】滴眼睛
by donghanwen1225 @ 2020-05-24 11:44:16
白内障,看不清,高锰酸钾滴眼睛
by critnos @ 2020-05-24 11:44:20
诶已经来了(
by donghanwen1225 @ 2020-05-24 11:44:37
@zhy137036 活捉SCP!