제출 #267058

#제출 시각아이디문제언어결과실행 시간메모리
267058biggTriangles (CEOI18_tri)C++14
0 / 100
1 ms256 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; set<ll> resp; void backtrack(ll soma, ll qualfat, ll n ){ resp.insert(soma + n - 1); for(int fat = qualfat; fat * fat <= n; fat++){ if(!(n%fat)){ backtrack(soma + fat -1, fat, n/fat); } } } ll n; int main(){ scanf("%lld", &n); backtrack(0, 2, n); printf("%lu\n", resp.size()); for(set<ll> :: iterator it = resp.begin(); it != resp.end(); it++){ printf("%lld ", *it); } printf("\n"); }

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

tri.cpp: In function 'int main()':
tri.cpp:16:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   16 |  scanf("%lld", &n);
      |  ~~~~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...