Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Nobita's candies problem
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<int>a;cout<<"Enter candies and friend in sequence as qus(x,n):\n"; for(int i=0;i<2*n;i++) { int x; cin>>x; a.push_back(x); } //int i=0; cout<<"Nobita can return or ask to Mom for minimum candied are:\n"; for(int i=0;i<2*n;) { cout<<a[i]%a[i+1]<<endl; i= 2+i; } return 0; }
run
|
edit
|
history
|
help
1
My love
Polyrmophism
Stok sinifi
Prime_Number_Cpp
major element
Nieparzyste w macierzy
Sieve of Eratosthenes
Cuantos
team name
arthi3.cpp