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 13 changed 9 lines
int n,m,a=0,b,c;
cin>>n>>m;
c=m-n;
a+=c/5;
c-=(c/5)*5;
a+=c/2;
c-=(c/2)*2;
a+=c;
cout<<a<<endl;
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 27 changed one line
!!Броеви
!!Продавница
At line 29 changed one line
%%prettify
%%prettify
At line 38 changed 6 lines
int n,m,a,b;
cin>>n>>m;
a=(n+m)/2;
b=n-a;
if(a>=0&&b>=0&&(n+m)%2==0)cout<<a<<" "<<b<<endl;
else cout<<"NE MOZE"<<endl;
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)
{
k=k-2;
dvojka++;
}
while(k>=1)
{
k=k-1;
kec++;
}
}
cout<<petka+dvojka+kec;
return 0;
At line 59 changed one line
int n,m,a=0,b,c;
int n, m, a=0, b, c;
At line 61 changed 6 lines
string ab;
cin>>ab;
for(int i=0;i<ab.size();i++)sum+=ab[i]-48;//-48 za da go konvertiras od ASCII u dekaden
if(sum%9==0)cout<<'0'<<endl;
else if(sum%3==0)cout<<'2'<<endl;//ako e deliv so 3 a ne so 9 treba da se dodate istiot broj uste 2 pati.
else cout<<'8'<<endl;//ako ne e deliv so 9 nitu pak 3 togas e zaemno prost so 9 pa treba da se sobere use 8 pati.
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 75 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 82 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 87 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