제출 #560133

#제출 시각아이디문제언어결과실행 시간메모리
560133AGENadan (COCI18_nadan)C++14
50 / 50
1 ms308 KiB
#include<bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define int long long
using namespace std;
const int N=1e6,M=2e3+10,mod=100000000000031;
vector<int>v;
int ans=0,a[50005][6],p_pow[5];
unordered_map<int,int>mp;

long long  summ(long long  x,long long  y){
    return ((x%mod)+(y%mod))%mod;
}

long long  mult(long long  x,long long  y){
    return ((x%mod)*(y%mod))%mod;
}

main()
{

    int n,m;
    cin>>m>>n;


    for(int i=0;i<n-1;i++)
        cout<<i+1<<endl,m-=(i+1);

    cout<<m<<endl;
    return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

nadan.cpp:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   20 | main()
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...