# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
159796 | 2019-10-24T16:23:45 Z | Doda | Tarifa (COCI16_tarifa) | C++ | 3 ms | 504 KB |
#include <iostream> using namespace std; int main () { int x,n,p,a,y; cin >> y >> n ; x = y; for (int i = 0; i<n ; i++){ cin >> p; x = y; x+= a; a = 0; if (p<x){ a += x-p ; } } int q = a+y; cout << q; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Incorrect | 2 ms | 376 KB | Output isn't correct |
3 | Incorrect | 3 ms | 504 KB | Output isn't correct |
4 | Incorrect | 2 ms | 376 KB | Output isn't correct |
5 | Incorrect | 2 ms | 376 KB | Output isn't correct |
6 | Incorrect | 2 ms | 256 KB | Output isn't correct |
7 | Incorrect | 2 ms | 376 KB | Output isn't correct |
8 | Incorrect | 2 ms | 376 KB | Output isn't correct |
9 | Incorrect | 2 ms | 252 KB | Output isn't correct |
10 | Incorrect | 2 ms | 256 KB | Output isn't correct |