Run Code
|
API
|
Code Wall
|
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
ThreadPool
doubly
getline vs cin
Extended Euclidean Algorithm
sd
StrStrPbrk
Riemann's prime number formula
Search in a rotated sorted array two methods
Avoiding visited networked paths
Queue with Limited Size of Arrays