Created
March 31, 2021 21:26
-
-
Save modos/221ac6f7940fae8329af3d3eb6e46939 to your computer and use it in GitHub Desktop.
آسمان شکر آباد
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
/** | |
* Main | |
*/ | |
public class Main { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
int n = input.nextInt(); | |
int m = input.nextInt(); | |
String[] a = new String[m]; | |
int count = 0; | |
for (int i = 0; i < n; i++) { | |
a = input.next().split(""); | |
for (int j = 0; j < m; j++) { | |
if(a[j].equals("*")){ | |
count++; | |
} | |
} | |
} | |
System.out.println(count); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment