Skip to content

Instantly share code, notes, and snippets.

@mizushou
Last active October 8, 2017 00:03
Show Gist options
  • Save mizushou/59144d44c60eb048d49e58a49ff08655 to your computer and use it in GitHub Desktop.
Save mizushou/59144d44c60eb048d49e58a49ff08655 to your computer and use it in GitHub Desktop.
import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String l = br.readLine();
int c = 0;
for(int i = 0; i < 6; i++) {
if(l.charAt(i) == '1') {
c++;
}
}
System.out.println(c);
}
}
@mizushou
Copy link
Author

Tenka1 Programmer Beginner Contest

  • Accepted...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment