Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
cpp
main.cpp 0.3 kB 4 20-Aug-2015 17:35 metotra Инженер, регионален 2013, напредна група

This page (revision-6) was last changed on 08-Nov-2015 12:45 by Penkov

This page was created on 20-Aug-2015 17:35 by mariomako

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed 2 lines
!!Продавница
!!Броеви
At line 4 changed one line
%%prettify
%%prettify
At line 6 changed one line
//Марио Величковски
//v10
At line 7 added one line
At line 9 added one line
At line 11 changed 22 lines
int p,v;
cin>>p>>v;
int kusur=v-p, i=0;
while(kusur>0)
{
if(kusur>=5)
{
kusur-=5;
i++;
}
else if(kusur>=2)
{
kusur-=2;
i++;
}
else if(kusur>=1)
{
kusur-=1;
i++;
}
}
cout<<i;
int z, r, x, y;
cin >> z >> r;
x=(z+r)/2;
y=z-x;
if(x>=0 && y>=0 && (z+r)%2==0)
cout << x << " " << y << endl;
else
cout << "NE MOZE" << endl;
At line 38 changed one line
!!Броеви
!!Продавница
At line 40 changed one line
%%prettify
%%prettify
At line 42 changed one line
//Марио Величковски
//v10
At line 36 added one line
At line 38 added one line
At line 47 changed 7 lines
int z,r;
cin>>z>>r;
int x,y;
y=(z+r)/2;
x=z-y;
int p1,p2;
if(x>y)
int x,y,k,petka=0,dvojka=0,kec=0;
cin>>x>>y;
k=y-x;
while(k>0){
while(k>=5)
{
k=k-5;
petka++;
}
while(k>=2)
At line 55 changed 2 lines
p1=x;
p2=y;
k=k-2;
dvojka++;
At line 58 changed one line
else
while(k>=1)
At line 60 changed 2 lines
p1=y;
p2=x;
k=k-1;
kec++;
At line 63 changed 8 lines
if(y<0 || x<0 || r!=p1-p2 || z!=p1+p2)
{
cout<<"NE MOZE";
}
else
{
cout<<p1<<" "<<p2;
}
}
cout<<petka+dvojka+kec;
At line 80 changed 41 lines
//mprelevic - Brojot 9 (test 2013)
#include <iostream>
#include <string>
using namespace std;
int main()
{
string broj;
int zbirCifri,tmp;
int cekori;
cekori = -1;
getline (cin,broj);
zbirCifri = 0;
for(int i = 0; i < broj.length(); i++)
{
zbirCifri += broj[i] - '0';
}
//cout << zbirCifri << endl;
tmp = zbirCifri;
if ((zbirCifri % 9) == 0)
{
cekori = 0;
}
else
{
cekori = 0;
while( (zbirCifri % 9) != 0)
{
zbirCifri += tmp;
cekori++;
}
}
cout << cekori;
//cin.get();cin.get();
return 0;
}
//v10
#include <iostream>
using namespace std;
int main()
{
int n, m, a=0, b, c;
long long sum=0;
string broj;
cin >> str;
for(int i=0;i<broj.size();i++){
suma+=broj[i]-48; //-48 или -'0' за да се конвертира од ASCII во декаден
}
if(suma%9==0)
cout << 0 << endl;
else if(suma%3==0)
cout << 2 << endl; //Ако е делив со 3, а не со 9 треба да се додаде збирот уште 2 пати
else
cout << 8 << endl; //Ако не е делив со 3 и 9, тогаш бројот е заемно прост со 9,
//треба да се собере уште 8 пати
return 0;
}
At line 128 changed 6 lines
//Филип Бујаровски
#include <iostream>
#include <cstring>
#include <cmath>
#include <math.h>
using namespace std;
//Филип Бујаровски
#include <iostream>
#include <cstring>
#include <cmath>
#include <math.h>
using namespace std;
At line 135 changed 4 lines
int main()
{
int i,j,n,k;
cin>>n;
int main(){
int i, j, n, k, zbir=0;
cin>>n;
At line 140 changed one line
int zbir=0;
At line 127 added one line
At line 130 added one line
At line 133 added one line
Version Date Modified Size Author Changes ... Change note
6 08-Nov-2015 12:45 2.84 kB Penkov to previous
5 08-Nov-2015 12:45 2.811 kB Lord_of_Life to previous | to last
4 20-Aug-2015 17:35 2.356 kB v10 to previous | to last
3 20-Aug-2015 17:35 2.351 kB v10 to previous | to last
2 20-Aug-2015 17:35 3.237 kB mariomako to previous | to last
1 20-Aug-2015 17:35 0.948 kB mariomako to last
« This page (revision-6) was last changed on 08-Nov-2015 12:45 by Penkov