Advertisement
zeneksilant

1.9.3

Oct 20th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class main {
  3. static void Owo (int n) {
  4. int b = 0;
  5. int ab = 0;
  6. int c = 0, a = 0;
  7. for (int i = 100; i < n; i++) {
  8. if (((i / 100) + (i % 100 / 10) + (i % 100 % 10)) % 13 == 0){
  9. ab = ab + 1;
  10. }
  11. }
  12. System.out.println(ab);
  13. }
  14. public static void main(String args[]) {
  15. Scanner sc = new Scanner(System.in);
  16. int n = sc.nextInt();
  17. Owo(n);
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement