제출 #932063

#제출 시각아이디문제언어결과실행 시간메모리
932063nomu평균 (COCI14_prosjek)C++17
50 / 50
1 ms348 KiB
// Example program #include <iostream> #include <string> using namespace std; int main() { int n, x; cin >> n; int a[100]; int b[100]; int i = 0; int sum = 0; while ( cin >> x ) { b[i] = x; ++i; if (cin.peek() == '\n') { break; } } for ( int i = 0; i < n; ++i ) { cout << (i+1)*b[i] - sum << " "; sum += (i+1)*b[i] - sum; } }

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

prosjek.cpp: In function 'int main()':
prosjek.cpp:10:9: warning: unused variable 'a' [-Wunused-variable]
   10 |     int a[100];
      |         ^
#Verdict Execution timeMemoryGrader output
Fetching results...