Rezultati

Up. imeNalogaJezikRezultatČas oddaje
mmj-2017 Hierarhija C++ 100/100OK 11. maj '17 @ 16:54

Test Točke Porabljen spomin Porabljen čas Status
#1 10/10 3,047 MiB 0,004 s OK
#2 10/10 3,047 MiB 0,004 s OK
#3 10/10 3,047 MiB 0,004 s OK
#4 10/10 3,082 MiB 0,004 s OK
#5 10/10 3,086 MiB 0,004 s OK
#6 10/10 3,086 MiB 0,004 s OK
#7 10/10 3,086 MiB 0,004 s OK
#8 10/10 3,082 MiB 0,004 s OK
#9 10/10 3,086 MiB 0,004 s OK
#10 10/10 3,082 MiB 0,004 s OK

Ocenjevani program (main.cpp):
#include <iostream>

using namespace std;

int main()
{
    int a,b,c,d,e,f;
    cin >> a >>b;
    if (a == b + 1){
        for (int i = 1; i < b; i++){
            cout << 1 << " ";
        }
        cout << 1 << endl;
    }
    else{
        for (int i = 0; i < b; i++){
            cout << 1 << " ";
        }
        for (int i = b; i < a - 2; i++){
            cout << i - b + 2 << " ";
        }
        cout << a - b << endl;
    }
    return 0;
}