Search is not available for this dataset
name stringlengths 2 112 | description stringlengths 29 13k | source int64 1 7 | difficulty int64 0 25 | solution stringlengths 7 983k | language stringclasses 4
values |
|---|---|---|---|---|---|
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
System.out.println("" + s.charAt(0) + (s.length() - 2 ) + s.charAt(s.length() - 1));
return;
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int l = s.length();
String first = s.substring(0,1);
String last = s.substring(l-1,l);
System.out.println(first+(l-2)+last);
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
System.out.print(S.substring(0,1));
System.out.print(S.length()-2);
System.out.print(S.substring(S.length()-1,S.length()));
}
public static int sample() {
re... | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
cout<<a[0]<<a.size()-2<<a[a.size()-1];
}
| CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | ss = input()
print(ss[0]+(str(len(ss)-2))+ss[-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
int count = 0;
System.out.print(s.charAt(0));
for (int i = 1; i < s.length()-1; i++){
count++;
}
System.out.print(count);
System.out.print(s.charAt(s.length()-1... | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s,*t,r=input();print(s+'%d'%len(t)+r) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
string s; cin>>s;
int t=s.length();
cout<< s[0] << t-2 << s[t-1] <<endl;
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s=input()
x=s[0]+str(len(s)-2)+s[-1]
print(x) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include <iostream>
using namespace std;
int main(){
string s;
cin >> s;
int a = s.size();
cout << s[0] << (a-2) << s[a-1] << endl;
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String length = String.valueOf(s.length() -2);
System.out.println(s.charAt(0) + length + s.charAt(Integer.parseInt(length) + 1));
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
int l=s.size()-2;
cout<<s[0]<<l<<s[s.size()-1];
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
String s = stdIn.next();
char a = s.charAt(0);
int b = s.length()-2;
char c = s.charAt(s.length()-1);
System.out.print(a);
System.out.print(b);
System.out.print(c);
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s = input()
x = len(s)
print(s[0]+str(x-2)+s[x-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
System.out.println(String.valueOf(s.charAt(0)) + (s.length() - 2) + String.valueOf(s.charAt(s.length() - 1)));
sc.close();
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include <cstdio>
int a;
char s[110];
int main ()
{
scanf ("%s",s);
for (a=0;s[a];a++) ;
printf ("%c%d%c\n",s[0],a-2,s[a-1]);
return 0;
}
| CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s = str(raw_input())
ln = str(len(s) - 2)
print s[0] + ln + s[-1] | PYTHON |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s = input()
print(f'{s[0]}{len(s) - 2}{s[-1]}') | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO θͺεηζγγγγ‘γ½γγγ»γΉγΏγ
Scanner sc = new Scanner(System.in);
String s = sc.next();
int len = s.length() - 2;
System.out.println(s.substring(0, 1) + len + s.substring(s.length() - 1, s.length()));
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int sum=s.size();
cout<<s[0]<<sum-2<<s[sum-1]<<endl;
return 0;
}
| CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
char[] C = S.toCharArray();
String ans = String.valueOf(C[0]) + (C.length - 2) + String.valueOf(C[(C.length - 1)]);
System.out.println(ans);
... | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<stdio.h>
#include<string.h>
int main(){
char s[105];
scanf("%s",s);
printf("%c%d%c\n",s[0],strlen(s)-2,s[strlen(s)-1]);
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
String ans = S.charAt(0) + String.valueOf((S.length()-2)) + S.charAt(S.length()-1);
System.out.println(ans);
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include <iostream>
using namespace std;
string S;
int main(){
cin >> S;
cout << S[0] << S.size()-2 << S[S.size()-1] << endl;
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include <iostream>
using namespace std;
string s;
int main() {
cin>>s;
int n=s.size();
cout<<s[0]<<(n-2)<<s[n-1]<<endl;
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
System.out.println(a.charAt(0) +""+ (a.length() - 2) +""+ a.charAt(a.length()-1));
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | S = input()
print(S[0]+str(len(S[0:-2]))+S[-1])
| PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<iostream>
using namespace std;
int main(){
string S;
cin >> S;
int L = S.size();
cout << S[0] << L-2 << S[L-1] << endl;
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String str = sc.next();
System.out.println(""+str.charAt(0) + (str.length()-2) + str.charAt(str.length()-1));
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s = input()
a = len(s)-2
print(s[0]+str(a)+s[-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
System.out.println(s.substring(0, 1) + String.valueOf(s.length() - 2) + s.substring(s.length()-1, s.length()));
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
String s = sc.next();
int length = s.length()-2;
System.out.print(s.charAt(0));
System.out.print(length);
System.out.println(s.charAt(length+1));
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<stdio.h>
#include<string.h>
int main()
{
char a[100];
scanf("%s",&a);
printf("%c%d%c\n",a[0],strlen(a)-2,a[strlen(a)-1]);
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s=input()
n=len(s)
n-=2
print(s[0]+str(n)+s[-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
// warm-up
public class Main {
static void solve() {
Scanner sc = new Scanner(System.in);
String t = sc.next();
System.out.println((""+t.charAt(0))+(t.length()-2)+(""+t.charAt(t.length()-1)));
sc.close();
}
public static void main(String args[]) {
solve();
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | a=input()
print(f"{a[0]}{len(a)-2}{a[len(a)-1]}") | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String S = sc.next();
int N = S.length();
System.out.println(""+S.charAt(0) + (N-2) + S.charAt(N-1));
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s = input()
l = len(s)
print(f'{s[0]}{l-2}{s[l-1]}') | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String a = s.substring(0, 1);
String b = s.substring(s.length() - 1, s.length());
int c = s.length() - 2;
System.out.prin... | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
char a[111];
gets(a);
cout<<a[0]<<strlen(a)-2<<a[strlen(a)-1]<<endl;
return 0;
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s = input()
print(s[0]+str(len(s[:-2]))+s[-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
String str = sc.next();
String count = String.valueOf(str.length() - 2);
System.out.println(str.charAt(0) + count + str.charAt(str.length() - 1));
... | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | S = input()
print(S[0] + str(S.__len__()-2) + S[-1])
| PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin>>s;
int n=s.size();
cout<<s[0]<<n-2<<s[n-1]<<endl;
}
| CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | a = input()
b = len(a)
print(a[0]+str(b-2)+a[b-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s=input()
print(s[:1]+str(len(s)-2)+s[(len(s)-1):]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
System.out.print(s.charAt(0));
System.out.print(s.length() - 2);
System.out.println(s.charAt(s.length() - 1));
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main()
{
char a[105];
cin>>a;
cout<<a[0]<<strlen(a)-2<<a[strlen(a)-1];
return 0;
}
| CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include <stdio.h>
#include <string.h>
char s[105];
int main(){
int n;
scanf("%s",s);
n=strlen(s);
printf("%c%d%c\n",s[0],n-2,s[n-1]);
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | l=input()
print(l[0]+str(len(l)-2)+l[-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main() {
string p;
cin>>p;
int k=p.size();
cout<<p.at(0)<<k-2<<p.at(k-1);
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
System.out.print(String.valueOf(s.charAt(0)) + (s.length()-2) + String.valueOf(s.charAt(s.length()-1)));
sc.close();
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int ans=0;
string s;
int main()
{
cin>>s;
ans=s.size()-2;
cout<<s[0]<<ans<<s[s.size()-1];
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<iostream>
using namespace std;
string s;
int main()
{
cin>>s;
cout<<s[0]<<s.size()-2<<s[s.size()-1]<<endl;
return 0;
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | word = raw_input().strip()
print word[0] + str(len(word)-2) + word[-1] | PYTHON |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.next();
int n = s.length()-2;
System.out.println("" + s.charAt(0) + n + s.charAt(s.length()-1));
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include <iostream>
using namespace std;
int main () {
string s;
cin>>s;
cout<<s[0]<<(s.size()-2)<<s[s.size()-1];
return 0;
}
| CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int n = s.length()-2;
System.out.print(s.charAt(0));
System.out.print(n);
System.out.print(s.charAt(s.length()-1));
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
cout << s.at(0) << s.size()-2 << s.at(s.size()-1);
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | a,*b,c = input()
print(a,len(b),c,sep="")
| PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String x = sc.next();
String y = Integer.toString(x.length() - 2);
System.out.print(x.charAt(0));
System.out.print(y);
System.out.println(x.charAt(x.length() -1));
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final String S = sc.next();
System.out.print(S.charAt(0));
System.out.print(S.length() - 2);
System.out.println(S.charAt(S.length()-1));
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | w = input()
print(w[0] + str(len(w)-2) + w[-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdin = new Scanner(System.in);
String s = stdin.next();
char x = s.charAt(0);
int y = s.length() - 2;
char z = s.charAt(s.length() - 1);
System.out.printf("%c%d%c%n", x, y... | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<iostream>
using namespace std;
int main(void)
{
string s;
cin>>s;
cout<<s[0]<<s.length()-2<<s[s.length()-1];
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | x, *s ,y = input()
print(x+str(len(s))+y) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
char a[100];
int main()
{
gets(a);
printf("%c%d%c",a[0],strlen(a)-2,a[strlen(a)-1]);
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner scanner = new Scanner(System.in)) {
String s = scanner.next();
System.out.println(s.substring(0, 1) + (s.length() - 2) + s.substring(s.length() - 1));
}
}
}
| JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | a,*b,c=input();print(a+str(len(b))+c) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int s;
string str;
int main(void)
{
cin>>str;
s=str.size()-1;
cout<<str[0]<<s-1<<str[s];
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<iostream>
#include<string>
using namespace std;
int main()
{
string s;
cin>>s;
int n=s.size();
cout<<s[0]<<n-2<<s[n-1];
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #ABc069B
s=raw_input()
print s[0]+str(len(s)-2)+s[-1]
| PYTHON |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | c,*s,d=input();print(c+str(len(s))+d) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
int main(){
char a[101];
cin>>a;
cout<<a[0]<<strlen(a)-2<<a[strlen(a)-1]<<endl;
return 0;
}
| CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
string a;
int main()
{
cin>>a;
cout<<a[0]<<a.size()-2<<a[a.size()-1]<<endl;
return 0;
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.Scanner;
public class Main
{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String text = sc.next();
String first = text.substring(0, 1);
String end = text.substring(text.length()-1, text.length());
System.out.println(first + (text.length() - 2) + end);
}
... | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include<iostream>
using namespace std;
string s,a[1010];
int main()
{ cin>>s;
cout<<s[0]<<s.length()-2<<s[s.length()-1];
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s = input()
print(s[0]+ str(int(len(s))-2) + s[-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s = list(raw_input())
print s[0] + str(len(s) - 2) + s[len(s) - 1] | PYTHON |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | import java.util.*;
public class Main{
public static void main(String[]args){
Scanner sc=new Scanner(System.in);
String s=sc.next();
int k=s.length();
System.out.print(s.charAt(0));
System.out.print(k-2);
System.out.println(s.charAt(k-1));
sc.close();
}
} | JAVA |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
int l = s.size()-2;
cout << s[0] <<l <<s[l+1] <<endl;
} | CPP |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | l=list(input())
print(l[0]+str(len(l)-2)+l[-1])
| PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | a=input()
ans=a[0]+str(len(a)-2)+a[-1]
print(ans) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s1,*s2,s3=map(str,input())
print(s1+str(len(s2))+s3) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s = input()
n = str(len(s)-2)
print(s[0]+n+s[-1]) | PYTHON3 |
p03636 AtCoder Beginner Contest 069 - i18n | The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.
You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.
Constraints
* 3 β€ |s| β€ 100 (|s| denotes ... | 6 | 0 | s=input()
N=len(s)-2
print(s[0]+str(N)+s[-1:]) | PYTHON3 |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include <bits/stdc++.h>
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define r... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
using namespace std;
int read()
{
char aa=getchar();int pp=1,kk=0;
if(aa<'0'||aa>'9') {if(aa=='-') pp=-1;aa=getchar();}
while(aa>='0'&&aa<='9') {kk=kk*10+aa-'0';aa=getchar();}
return kk*pp;
}
char s[500005];
int n,L,f[500005][27],g[500005][21];
v... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | // In the name of God
#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>
usin... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | // package atcoder.other2017.mujin2017;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class Main {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
Pr... | JAVA |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
struct FastIO{
FastIO(){
cin.tie(0);
ios::sync_with_stdio(0);
}
}fastio_beet;
//I... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 |
import java.io.*;
import java.math.*;
import java.util.*;
import static java.util.Arrays.*;
public class Main {
private static final int mod = (int)1e9+7;
final Random random = new Random(0);
final IOFast io = new IOFast();
/// MAIN CODE
public void run() throws IOException {
// int TEST_CASE = Integer.pars... | JAVA |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
const int MAXSIZE=20000020;
const int maxn=500003;
int bufpos;
char buf[MAXSIZE];
void init(){
buf[fread(buf,1,MAXSIZE,stdin)]='\0';
bufpos=0;
}
int readint(){
bool isneg;
int val=0;
for(;!isdigit(buf[bufpos]) && buf[bufpos]!='-';bufpos++);
bufpos+=(... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | // srt: 2017εΉ΄02ζ28ζ₯ 15ζ26ε48η§
// γε«θζ―γ ι»ζ―δ»
// ζ΄εΈ·ζζ―ζ²³ζ’ε»οΌη½εζηζ³ͺηΌζ―γ
// ζ¨ζ¨ζ΄ι¨ι£ιͺε€οΌζ€ζΆζεδΈε¦ζ γ
// end: 2017εΉ΄02ζ28ζ₯ 15ζ55ε06η§
#include<cstdio>
#include<cstring>
inline void read(int&r)
{
register char c;r=0;
do c=getchar();while(c<'0'||c>'9');
do r=r*10+c-'0',c=getchar();while(c>='0'&&c<='9');
}
char s[500001];
int next[27][5... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
typedef pair<double,int>Q;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc secon... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<double, double> pd... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include <bits/stdc++.h>
#define maxn 500005
#define maxk 20
using namespace std;
string s;
int Q, n;
int nxt[maxn][26], vanish[maxn], jump[maxn][maxk];
bool getJump(int src, int dst) {
int i = maxk - 1;
while (i >= 0) {
if (jump[src][i] == dst) {
return true;
}
if (jump[src][i] >= 0 && jump[src][i] < dst... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include <bits/stdc++.h>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define RI(X) scanf("%d", &(X))
#define RII(X, Y) scanf("%d%d", &(X), &(Y))
#define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y... | CPP |
p03793 Mujin Programming Challenge 2017 - Robot and String | You are developing a robot that processes strings. When the robot is given a string t consisting of lowercase English letters, it processes the string by following the procedure below:
1. Let i be the smallest index such that t_i = t_{i + 1}. If such an index does not exist, terminate the procedure.
2. If t_i is `z`, ... | 6 | 0 | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
char s[600001];
int i,j,k,n,m,f[600001][27],g[600001][21];
void build(){
int i,j;
for (i=0;i<=20;i++) g[n+1][i]=g[n+2][i]=n+1;
for (i=n;i;i--)
for (j=1,g[i][0]=f[i][0];j<=20;j++) g[i][j]=g[g[i][j-1]+1][j-1];
}
bool query(int x,int v){
int... | CPP |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.