Advertisement
Guest User

Untitled

a guest
Feb 24th, 2013
1,156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. /**
  2.  * Created with IntelliJ IDEA.
  3.  * User: Fcdkbear
  4.  * Date: 11.02.13
  5.  * Time: 16:48
  6.  * To change this template use File | Settings | File Templates.
  7.  */
  8.  
  9. import java.util.Scanner;
  10. public class test {
  11.     public static void main(String [] args)
  12.     {
  13.         Scanner sc=new Scanner(System.in);
  14.         String s = sc.next();
  15.         int n=s.length();
  16.         int odd=0;
  17.         for (int i=0; i<26; ++i)
  18.         {
  19.             int v1=(int)('a')+i;
  20.             int cnt=0;
  21.             for (int j=0; j<n; ++j)
  22.             {
  23.                 int v2=(int)(s.charAt(j));
  24.                 if (v1==v2)
  25.                     cnt++;
  26.                 //System.out.println(cnt);
  27.             }
  28.             if ((cnt%2)==1)
  29.                 odd++;
  30.         }
  31.         if ((odd==0) || ((odd%2)==1))
  32.             System.out.println("First");
  33.         else
  34.             System.out.println("Second");
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement