P4956 Davor

在这里插入图片描述
在这里插入图片描述

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

int main()
{
    
    

    int n;
    cin>>n;
    for(int k=1;;k++)
    {
    
    
        for(int x=100;x>0;x--)
        {
    
    
            if((7*x+21*k)*52==n)
            {
    
    
                printf("%d\n%d\n",x,k);
                return 0;
            }


        }
    }


    return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_45976312/article/details/112988287
p
P2P