Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class ZEl{
- int Stelle;
- boolean Covered;
- }
- public class Zykel {
- static Scanner sc=new Scanner(System.in);
- public static void P(String P) {
- System.out.println(P);
- }
- public static ZEl ZEl(int a) {
- ZEl Out=new ZEl();
- Out.Stelle=a;
- Out.Covered=false;
- return Out;
- }
- public static int StringzuInt(String In) {
- int c=In.length()-1;
- int Out=0;
- while (c>=0) {
- }
- }
- public static int[] Zykelreturn(String In) {
- In=In.replaceAll(" ", "");
- int c=0;
- int k=0;
- int Kommata=0;
- while (c<In.length()) {
- if (In.charAt(c)==',') {
- Kommata++;
- }
- c++;
- }
- P(""+Kommata);
- c=0;
- int z=0;
- ZEl Out[]=new ZEl[Kommata];
- while (c<In.length()) {
- k=c;
- while(In.charAt(c)!=',') {
- c++;
- }
- Out[z]=ZEl(StringzuInt(In.substring(k,c)));
- c+=2;
- }
- return Out;
- }
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Zykelreturn("1,1,2,1,3");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement