Submission #71508095


Source Code Expand

#include <stdio.h>

int main(void){
  int n;
  scanf("%d",&n);
  
  int array[n];
  for(int i = 0;i<n;i++){
      int temp;
      scanf("%d",&temp);
      array[i] = temp;
  }
    
  int counter = 0;
  int actual_counter = 0;
    
  for(int i = 0;i<n;i++){
    for(int j = i;j<n;j++){
        int sum = 0;
        for(int k = i;k<=j;k++){
            sum = sum + array[k];
        }
        for(int k = i;k<=j;k++){
            if(sum%array[k]==0){
                counter++;
                 
            }
        }
        if(counter == 0){
            actual_counter++;
        }
        counter = 0;
    }
}
    
 printf("%d",actual_counter);
}

Submission Info

Submission Time
Task B - No-Divisible Range
User invi_XD
Language C23 (GCC 14.2.0)
Score 200
Code Size 685 Byte
Status AC
Exec Time 0 ms
Memory 1712 KiB

Compile Error

Main.c: In function ‘main’:
Main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |   scanf("%d",&n);
      |   ^~~~~~~~~~~~~~
Main.c:10:7: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |       scanf("%d",&temp);
      |       ^~~~~~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 25
Set Name Test Cases
Sample example_00.txt, example_01.txt
All example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt
Case Name Status Exec Time Memory
example_00.txt AC 0 ms 1676 KiB
example_01.txt AC 0 ms 1664 KiB
hand_00.txt AC 0 ms 1688 KiB
hand_01.txt AC 0 ms 1620 KiB
hand_02.txt AC 0 ms 1588 KiB
hand_03.txt AC 0 ms 1588 KiB
hand_04.txt AC 0 ms 1620 KiB
hand_05.txt AC 0 ms 1640 KiB
hand_06.txt AC 0 ms 1676 KiB
hand_07.txt AC 0 ms 1664 KiB
random_00.txt AC 0 ms 1640 KiB
random_01.txt AC 0 ms 1640 KiB
random_02.txt AC 0 ms 1544 KiB
random_03.txt AC 0 ms 1500 KiB
random_04.txt AC 0 ms 1712 KiB
random_05.txt AC 0 ms 1504 KiB
random_06.txt AC 0 ms 1640 KiB
random_07.txt AC 0 ms 1640 KiB
random_08.txt AC 0 ms 1712 KiB
random_09.txt AC 0 ms 1588 KiB
random_10.txt AC 0 ms 1676 KiB
random_11.txt AC 0 ms 1712 KiB
random_12.txt AC 0 ms 1664 KiB
random_13.txt AC 0 ms 1712 KiB
random_14.txt AC 0 ms 1664 KiB