Last login: Sun Apr 12 20:10:07 on ttys012

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
masudayuuyanoMacBook-Pro:~ masudayuuya$ cd atcoder
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ ls
#welcome.c#		divide.c		goldencoins1.c
PlacingMarbles		divide1			goldencoins1.c~
PlacingMarbles.c	divide1.c		lucky7
Product			division		lucky7.c
Product.c		division.c		ordinary
a			division.c~		ordinary.c
a.c			dodecagon		placing
airplane		dodecagon.c		replacing
airplane.c		exception		replacing.c
anti			exception.c		replacing.c~
anti.c			exception.c~		replacing2
anti.c~			ferris			replacing2.c
ball			ferris.c		replacing2.c~
ball.c			fizz			rounding
bire			fizz.c			rounding.c
bite			golden			security
bite.c			golden.c		security.c
bounding.c		golden.c~		sum
coffee			goldencoins		sum.c
coffee.c		goldencoins.c		sum.c~
coffee.c~		goldencoins.c~		welcome
divide			goldencoins1		welcome.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs gcd.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs sum.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ ./sum
2
8masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs sum.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ gcc sum.c -o sum
sum.c:44:15: error: use of undeclared identifier 'l'
  for(int i=K;l++){
              ^
sum.c:45:22: error: use of undeclared identifier 'j'
        sum += gcd(i,j,l);
                     ^
sum.c:45:24: error: use of undeclared identifier 'l'
        sum += gcd(i,j,l);
                       ^
sum.c:48:3: error: extraneous closing brace ('}')
  }
  ^
sum.c:49:10: error: expected parameter declarator
  printf("%d",sum);
         ^
sum.c:49:10: error: expected ')'
sum.c:49:9: note: to match this '('
  printf("%d",sum);
        ^
sum.c:49:3: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
  printf("%d",sum);
  ^
sum.c:49:3: error: conflicting types for 'printf'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:170:6: note: 
      previous declaration is here
int      printf(const char * __restrict, ...) __printflike(1, 2);
         ^
sum.c:50:3: error: expected identifier or '('
  return 0;
  ^
sum.c:51:1: error: extraneous closing brace ('}')
}
^
1 warning and 9 errors generated.
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs sum.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ gcc sum.c -o sum
sum.c:51:10: error: expected parameter declarator
  printf("%d",sum);
         ^
sum.c:51:10: error: expected ')'
sum.c:51:9: note: to match this '('
  printf("%d",sum);
        ^
sum.c:51:3: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
  printf("%d",sum);
  ^
sum.c:51:3: error: conflicting types for 'printf'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:170:6: note: 
      previous declaration is here
int      printf(const char * __restrict, ...) __printflike(1, 2);
         ^
sum.c:52:3: error: expected identifier or '('
  return 0;
  ^
sum.c:53:1: error: extraneous closing brace ('}')
}
^
1 warning and 5 errors generated.
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs sum.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ gcc sum.c -o sum
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ ./sum
2
8masudayuuyanoMacBook-Pro:atcoder masudayuuya$ ./
-bash: ./: is a directory
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ ./sum
3
27masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs sum.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ gcc sum.c -o sum
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ ./sum
2
15masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs sum.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ gcc sum.c -o sum
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ ./sum
2
9masudayuuyanoMacBook-Pro:atcoder masudayuuya$ ./sum
3
30masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs sum.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs sum.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs fizz.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ gcc fizz.c -o fizz
fizz.c:7:21: error: expected ')'
    if((i+1)%15 != 0{
                    ^
fizz.c:7:7: note: to match this '('
    if((i+1)%15 != 0{
      ^
1 error generated.
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs fizz.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ gcc fizz.c -o fizz
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ less fizz.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs sum.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ ./sum
200
-1050018460masudayuuyanoMacBook-Pro:atcoder masudayuuya$ 
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs fizz.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ gcc fizz.c -o fizz
fizz.c:7:16: error: expression is not assignable
    if((i+1)%3 = 0 || (i+1)%5 == 0){
       ~~~~~~~ ^
1 error generated.
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ emacs fizz.c
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ gcc fizz.c -o fizz
masudayuuyanoMacBook-Pro:atcoder masudayuuya$ less fizz.c

#include <stdio.h>
int main(void){
  int N;
  scanf("%d",&N);
  int a[N];int sum=0;
  for(int i=0;i<N;i++){
    if((i+1)%3 == 0 || (i+1)%5 == 0){
      a[i]=0;
    } else{
      a[i]=i+1;
    }
  sum += a[i];
  }
  printf("%d",sum);
  return 0;
}







