We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5bab1b commit 4f6ed54Copy full SHA for 4f6ed54
codeforces/2067C/Main.java
@@ -8,7 +8,6 @@ public static void main(String[] args) throws java.lang.Exception {
8
int t = cin.nextInt();
9
while (t-- > 0) {
10
int n = cin.nextInt();
11
- int ans = 0;
12
String s = Integer.toString(n);
13
boolean hasSeven = false;
14
for (int i = 0; i < s.length(); i++) {
@@ -21,9 +20,15 @@ public static void main(String[] args) throws java.lang.Exception {
21
20
System.out.println(0);
22
continue;
23
}
24
-
25
- ans = 1;
26
- System.out.println(1);
+ int ans = 0;
+ if (n % 9 == 0) {
+ System.out.println(1);
+ } else if ((n + (9 - (n % 9))) % 10 == 7) {
27
28
+ }
29
+ else {
30
31
32
33
34
0 commit comments