ch
Feedback
Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO

Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO

前往频道在 Telegram

Main channel https://t.me/Coding_000 Contact Admin 👉 @ILOVEU_143 for booking your exam slots Web- https://coding000.github.io/Projects/ 💯% clearance in any placement exams OffCampus -https://t.me/Offcampus_000 Discussion- https://t.me/exams_discussion

显示更多
3 337
订阅者
-424 小时
-147
-5330
帖子存档
python 1st code tcs Note-Change the logic and variables to avoid plagarism 😊😁 @Coding_000
python 1st code tcs Note-Change the logic and variables to avoid plagarism 😊😁 @Coding_000

N=int(input()) A=[] A=list(map(int,input().split())) #print(A) Q=int(input()) ARRAY=[] from itertools import repeat ARRAY=[[]for i in repeat(None,Q)] #print(ARRAY) for i in range(0,Q):     x,y=input().split()     x=int(x)     y=int(y)     ARRAY[i].append(x)     ARRAY[i].append(y) #print(ARRAY) for i in range(0,Q):     count=0     if(ARRAY[i][0]==0):         for j in range(len(A)):             if(A[j]>=ARRAY[i][1]):                 count+=1         print(count)     elif(ARRAY[i][0]==1):         for j in range(len(A)):             if(A[j]>ARRAY[i][1]):                 count+=1         print(count)     else:         pass Python Rajesh Code-Tcs 2nd code

#include using namespace std; string decimalToBinary(int n) { string s = bitset<64> (n).to_string(); const auto loc1 =
#include <bits/stdc++.h> using namespace std; string decimalToBinary(int n) { string s = bitset<64> (n).to_string(); const auto loc1 = s.find('1'); if(loc1 != string::npos)   return s.substr(loc1); return "0"; } int main() { int n; cin>>n; int ans=1; string s =decimalToBinary(n); for(int i=s.size()-1;i>=0;i--) {      if(s[i]=='1')      break;      else      ans++; } cout<<ans; return 0; } C++ @Coding_000