제출 #81630

#제출 시각아이디문제언어결과실행 시간메모리
81630xiaowuc1평균 (COCI14_prosjek)C++14
50 / 50
2 ms708 KiB
#include <bits/stdc++.h> /* unsigned seed1 = std::chrono::system_clock::now().time_since_epoch().count(); mt19937 g1.seed(seed1); ios_base::sync_with_stdio(false); cin.tie(NULL); */ using namespace std; const double PI = 2 * acos(0); typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<int, ll> pill; typedef pair<ll, ll> pll; typedef long double ld; typedef vector<vector<ll>> matrix; ll l[105]; ll ret[105]; int n; int main() { scanf("%d", &n); for(int i = 1; i <= n; i++) { scanf("%lld", &l[i]); } ret[1] = l[1]; for(int i = 2; i <= n; i++) { ret[i] = l[i] * i; for(int a = 1; a < i; a++) { ret[i] -= ret[a]; } } for(int i = 1; i <= n; i++) { printf("%lld", ret[i]); if(i == n) printf("\n"); else printf(" "); } }

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

prosjek.cpp: In function 'int main()':
prosjek.cpp:26:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &n);
   ~~~~~^~~~~~~~~~
prosjek.cpp:28:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%lld", &l[i]);
     ~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...