eolymp
Problems

01110001, That Is the Question

published at 8/11/13, 1:50:11 pm

Поясните, пожалуйста, почему решение #1072171 получило ошибку компиляции? У себя компилирую с ключом -Wall и всё гладко.

published at 1/10/17, 2:22:44 am

113?

published at 2/9/22, 12:57:43 pm

xosqedem yox xosdeqem hidet qizi

published at 2/9/22, 3:19:16 pm

include <iostream>

include <cmath>

using namespace std;

int convert(long long);

int main() { long long n;

cin >> n; cout << convert(n) ; return 0; }

int convert(long long n) { int dec = 0, i = 0, rem;

while (n!=0) { rem = n % 10; n /= 10; dec += rem * pow(2, i); ++i; }

return dec; }

published at 2/9/22, 6:58:05 pm

include<stdio.h>

include<math.h>

int main(){ long long i,n,on=0,q; scanf("%lld",&n); for(i=0;n!=0;i++){ q=n%10; n=n/10; on=on+q*pow(2,i); } printf("%lld",on); return 0; }

published at 7/1/22, 11:49:37 pm

include <iostream>

include <math.h>

using namespace std; int main ( ) { long long n,res=0,i=0,x; cin>>n; while(n) { x=n%10; res=res+x*pow(2,i++); n=n/10; } cout<<res; }