Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Rzutka gra 2
//g++ 5.4.0 #include <iostream> #include <cmath> using namespace std; int x,y,z,a,i,s; int main() { cin>>x>>y>>z; for(i;i<z;i++) { cin>>a; if(a>=x && a<=y) { s=0; } else if(a>y) { s=s+(a-y); } else { s=s+(x-a); } } cout<<s; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
base base
matrix calculator
Using c++11 range-base for loop
Rubix
Dar
MyStringv2
dodawanie "MIECIERZY"
Dar
runtime template mode processor
C++ state machine prototype
Please log in to post a comment.