#include <iostream>
#include <vector>
#include <string>
using namespace std;
int solve(string s) {
if (s.empty() || s[0] == '0') {
return 0;
}
int n = s.size();
vector<int> dp(n + 1, 0);
dp[0] = 1;
dp[1] = 1;
for (int i = 2; i <= n; ++i) {
if (s[i - 1] >= '1' && s[i - 1] <= '9') {
dp[i] += dp[i - 1];
}
int t = stoi(s.substr(i - 2, 2));
if (t >= 10 && t <= 26) {
dp[i] += dp[i - 2];
}
}
return dp[n];
}
int main() {
string s;
cin >> s;
int result = solve(s);
cout << result << endl;
return 0;
}
Decipher the numbersโ
Dream11
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Nuvama are hiring for AI ML role
Experience Range - Freshers - 2 Years of expertise!!
Location - BKC
Freshers willing to kickstart their career in AI ML role are welcome!!!!
Mail CV to - vidhi.thakkar@nuvama.com
Experience Range - Freshers - 2 Years of expertise!!
Location - BKC
Freshers willing to kickstart their career in AI ML role are welcome!!!!
Mail CV to - vidhi.thakkar@nuvama.com
๐1
import re
a = ["Inc.", "Corp.", "LLC", "L.L.C.", "LLC."]
b = ["the", "an", "a", "and"]
def normalize_name(c):
c = c.lower()
for d in a:
if c.endswith(d.lower()):
c = c[:-len(d)].strip()
c = re.sub(r'[&,]', ' ', c)
c = re.sub(r'\s+', ' ', c)
d = c.split()
if d[0] in b:
d = d[1:]
c = ' '.join(d)
return c.strip()
def check_availability(d):
e = set()
for f in d:
g, c = f.split('|')
h = normalize_name(c)
if not h:
print(f"{g}|Name Not Available")
elif h in e:
print(f"{g}|Name Not Available")
else:
e.add(h)
print(f"{g}|Name Available")
Stripe โ
๐1๐คฎ1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
https://docs.google.com/forms/d/e/1FAIpQLSe-QUx66Fwb1eAtTskuh6Cf-GDNUrPn5cZxt7NWwIw-PkxiIA/viewform
JD: https://fluttering-dry-458.notion.site/Openings-at-Multibagg-Remote-111b5a5ac6028081a508efc31414084a
JD: https://fluttering-dry-458.notion.site/Openings-at-Multibagg-Remote-111b5a5ac6028081a508efc31414084a
Google Docs
Backend Developer @ Multibagg
Weโre building an AI-powered global equity research platform that will make fundamental investing easy, rewarding, and fun for everyone. Itโs a product from India, but made for the world, aimed at giving people access to high quality financial insights.
Weโreโฆ
Weโreโฆ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Apeksha Rawat on LinkedIn: Hi Everyone,
EXL is organizing a Walkin drive at sector 144, Noida, onโฆ | 110 comments
EXL is organizing a Walkin drive at sector 144, Noida, onโฆ | 110 comments
Hi Everyone,
EXL is organizing a Walkin drive at sector 144, Noida, on 15th Oct'2024 for Back-office role.
Eligibility criteria-
โขExperience required:โฆ | 110 comments on LinkedIn
EXL is organizing a Walkin drive at sector 144, Noida, on 15th Oct'2024 for Back-office role.
Eligibility criteria-
โขExperience required:โฆ | 110 comments on LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Trisha Sahoo on LinkedIn: Greetings from WIPRO! ๐
๐ Exciting opportunity for Freshers to join ourโฆ
๐ Exciting opportunity for Freshers to join ourโฆ
Greetings from WIPRO! ๐
๐ Exciting opportunity for Freshers to join our team in Hyderabad for a Mapping role! ๐บ๏ธ
๐ Walk-in interview dates: 14th to 16thโฆ
๐ Exciting opportunity for Freshers to join our team in Hyderabad for a Mapping role! ๐บ๏ธ
๐ Walk-in interview dates: 14th to 16thโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Celeris (fka WLPayments) hiring Java Developer in New Delhi, Delhi, India | LinkedIn
Posted 6:34:24 AM. Job DescriptionWe are seeking a highly skilled and motivated Java Developer to join our dynamicโฆSee this and similar jobs on LinkedIn.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Cobalt is hiring Front-end Intern
For 2025, 2026 grads
Location: Remote
https://wellfound.com/jobs/3072361-frontend-engineering-intern-reactjs
For 2025, 2026 grads
Location: Remote
https://wellfound.com/jobs/3072361-frontend-engineering-intern-reactjs
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Razorpay is hiring Security Engineer
For 2021, 2022, 2023 grads
Location: Bangalore
https://job-boards.greenhouse.io/razorpaysoftwareprivatelimited/jobs/4441569005
For 2021, 2022, 2023 grads
Location: Bangalore
https://job-boards.greenhouse.io/razorpaysoftwareprivatelimited/jobs/4441569005
def process_string(number):
while True:
found_consecutive = False
new_string = []
i = 0
while i < len(number):
j = i
while j < len(number) and number[j] == number[i]:
j += 1
if j - i > 1:
found_consecutive = True
sum_of_digits = sum(int(number[k]) for k in range(i, j))
new_string.append(str(sum_of_digits))
else:
new_string.append(number[i])
i = j
number = ''.join(new_string)
if not found_consecutive:
break
return number
Visa โ
from collections import Counter
def countValidWords(s):
def is_valid(word):
if len(word) < 3:
return False
if not all(char.isalnum() for char in word):
return False
has_vowel = any(char.lower() in 'aeiou' for char in word)
has_consonant = any(char.isalpha() and char.lower() not in 'aeiou' for char in word)
return has_vowel and has_consonant
words = s.split()
count = sum(1 for word in words if is_valid(word))
return count
Word Count Tool โ
def roman_to_decimal(a):
b = {'I': 1, 'V': 5, 'X': 10, 'L': 50}
c = 0
for i in range(len(a)):
if i > 0 and b[a[i]] > b[a[i - 1]]:
c += b[a[i]] - 2 * b[a[i - 1]]
else:
c += b[a[i]]
return c
def sortRoman(names):
def custom_sort(e):
d = e.split()
return (d[0], roman_to_decimal(d[1]))
sorted_names = sorted(names, key=custom_sort)
return sorted_names
Romanizer โ
b = {'I': 1, 'V': 5, 'X': 10, 'L': 50}
c = 0
for i in range(len(a)):
if i > 0 and b[a[i]] > b[a[i - 1]]:
c += b[a[i]] - 2 * b[a[i - 1]]
else:
c += b[a[i]]
return c
def sortRoman(names):
def custom_sort(e):
d = e.split()
return (d[0], roman_to_decimal(d[1]))
sorted_names = sorted(names, key=custom_sort)
return sorted_names
Romanizer โ
๐1