Language: C++

#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
#mint
class ModInt:
    def __init__(self, x):
        self.x = x % mod
    
    def __str__(self):
        return str(self.x)
    
    __repr__ = __str__

    def __add__(self, other):
        if isinstance(other, ModInt):
            return ModInt(self.x + other.x)
        else:
            return ModInt(self.x + other)

    __radd__ = __add__
        
    def __sub__(self, other):
        if isinstance(other, ModInt):
            return ModInt(self.x - other.x)
        else:
            return ModInt(self.x - other)

    def __rsub__(self, other):
        if isinstance(other, ModInt):
            return ModInt(other.x - self.x)
        else:
            return ModInt(other - self.x)

    def __mul__(self, other):
        if isinstance(other, ModInt):
            return ModInt(self.x * other.x)
        else:
            return ModInt(self.x * other)

    __rmul__ = __mul__

    def __truediv__(self, other):
        if isinstance(other, ModInt):
            return ModInt(self.x * pow(other.x, mod-2,mod))
        else:
            return ModInt(self.x * pow(other, mod - 2, mod))
            
    def __rtruediv(self, other):
        if isinstance(other, self):
            return ModInt(other * pow(self.x, mod - 2, mod))
        else:
            return ModInt(other.x * pow(self.x, mod - 2, mod))
            

    def __pow__(self, other):
        if isinstance(other, ModInt):
            return ModInt(pow(self.x, other.x, mod))
        else:
            return ModInt(pow(self.x, other, mod))
            

    def __rpow__(self, other):
        if isinstance(other, ModInt):
            return ModInt(pow(other.x, self.x, mod))
        else:
            return ModInt(pow(other, self.x, mod))

def main():
    N=I()
    X=LI()
    ans = ModInt(0)
    # ans = 0
    fact = ModInt(1)
    for i in range(1,N):
        fact*=i
    # print(fact)###########
    for i,x in enumerate(X[:-1],start=0):
        S = 0
        f = fact
        # print("f",f)
        for j,y in enumerate(X[i+1:],start=1):
            # print(f,f/2)
            f/=N-i-j
            print("y:",y,"j",j)
            # print(N-i-j)
            # print(y,f,(y-x)*f)
            print(f,j-1,N-i-j)
            f*=max(1,j-1)
            print("f",f)
            S+=(y-x)*f
        # break
        print()
        ans += S
        # ans += S*(fact/(N-i))
    # for i in range(1,N):
        # ans*=i
        # ans%=mod
    print(ans)
if __name__ == '__main__':
    main()

Compiler output:
a.cc:2:3: error: extended character 　 is not valid in an identifier
    2 | # 　　  ⋀_⋀　
      |   ^
a.cc:2:3: error: extended character 　 is not valid in an identifier
a.cc:2:3: error: invalid preprocessing directive #\U00003000\U00003000
    2 | # 　　  ⋀_⋀　
      |   ^~~~
a.cc:2:9: error: extended character ⋀ is not valid in an identifier
    2 | # 　　  ⋀_⋀　
      |         ^
a.cc:2:9: error: extended character ⋀ is not valid in an identifier
a.cc:2:9: error: extended character 　 is not valid in an identifier
a.cc:3:2: error: extended character 　 is not valid in an identifier
    3 | #　　  (･ω･)
      |  ^
a.cc:3:2: error: extended character 　 is not valid in an identifier
a.cc:3:2: error: invalid preprocessing directive #\U00003000\U00003000
    3 | #　　  (･ω･)
      |  ^~~~
a.cc:4:3: error: invalid preprocessing directive #.
    4 | # .／ Ｕ ∽ Ｕ＼
      |   ^
a.cc:4:10: error: extended character ∽ is not valid in an identifier
    4 | # .／ Ｕ ∽ Ｕ＼
      |          ^
a.cc:5:4: error: extended character │ is not valid in an identifier
    5 | #  │＊　合　＊│
      |    ^
a.cc:5:4: error: extended character 　 is not valid in an identifier
a.cc:5:4: error: extended character 　 is not valid in an identifier
a.cc:5:4: error: extended character │ is not valid in an identifier
a.cc:5:4: error: invalid preprocessing directive #\U00002502\U0000ff0a\U00003000\U00005408\U00003000\U0000ff0a\U00002502
    5 | #  │＊　合　＊│
      |    ^~~~~~~~~~~~
a.cc:6:4: error: extended character │ is not valid in an identifier
    6 | #  │＊　格　＊│
      |    ^
a.cc:6:4: error: extended character 　 is not valid in an identifier
a.cc:6:4: error: extended character 　 is not valid in an identifier
a.cc:6:4: error: extended character │ is not valid in an identifier
a.cc:6:4: error: invalid preprocessing directive #\U00002502\U0000ff0a\U00003000\U0000683c\U00003000\U0000ff0a\U00002502
    6 | #  │＊　格　＊│
      |    ^~~~~~~~~~~~
a.cc:7:4: error: extended character │ is not valid in an identifier
    7 | #  │＊　祈　＊│
      |    ^
a.cc:7:4: error: extended character 　 is not valid in an identifier
a.cc:7:4: error: extended character 　 is not valid in an identifier
a.cc:7:4: error: extended character │ is not valid in an identifier
a.cc:7:4: error: invalid preprocessing directive #\U00002502\U0000ff0a\U00003000\U00007948\U00003000\U0000ff0a\U00002502
    7 | #  │＊　祈　＊│
      |    ^~~~~~~~~~~~
a.cc:8:4: error: extended character │ is not valid in an identifier
    8 | #  │＊　願　＊│
      |    ^
a.cc:8:4: error: extended character 　 is not valid in an identifier
a.cc:8:4: error: extended character 　 is not valid in an identifier
a.cc:8:4: error: extended character │ is not valid in an identifier
a.cc:8:4: error: invalid preprocessing directive #\U00002502\U0000ff0a\U00003000\U00009858\U00003000\U0000ff0a\U00002502
    8 | #  │＊　願　＊│
      |    ^~~~~~~~~~~~
a.cc:9:4: error: extended character │ is not valid in an identifier
    9 | #  │＊　　　＊│
      |    ^
a.cc:9:4: error: extended character 　 is not valid in an identifier
a.cc:9:4: error: extended character 　 is not valid in an identifier
a.cc:9:4: error: extended character 　 is not valid in an identifier
a.cc:9:4: error: extended character │ is not valid in an identifier
a.cc:9:4: error: invalid preprocessing directive #\U00002502\U0000ff0a\U00003000\U00003000\U00003000\U0000ff0a\U00002502
    9 | #  │＊　　　＊│
      |    ^~~~~~~~~~~~
a.cc:10:8: error: invalid preprocessing directive #\U0000ffe3
   10 | #      ￣
      |        ^~
a.cc:15:54: error: stray '#' in program
   15 | from math import floor,ceil,sqrt,factorial,hypot,log #log2ないｙｐ
      |                                                      ^
a.cc:21:11: warning: multi-character character constant [-Wmultichar]
   21 | inf=float('inf')
      |           ^~~~~
a.cc:38:40: error: empty character constant
   38 | def ST(): return input().replace('\n', '')
      |                                        ^~
a.cc:39:2: error: invalid preprocessing directive #mint
   39 | #mint
      |  ^~~~
a.cc:107:7: error: invalid preprocessing directive #ans
  107 |     # ans = 0
      |       ^~~
a.cc:111:7: error: invalid preprocessing directive #print
  111 |     # print(fact)###########
      |       ^~~~~
a.cc:115:11: error: invalid preprocessing directive #print
  115 |         # print("f",f)
      |           ^~~~~
a.cc:117:15: error: invalid preprocessing directive #print
  117 |             # print(f,f/2)
      |               ^~~~~
a.cc:120:15: error: invalid preprocessing directive #print
  120 |             # print(N-i-j)
      |               ^~~~~
a.cc:121:15: error: invalid preprocessing directive #print
  121 |             # print(y,f,(y-x)*f)
      |               ^~~~~
a.cc:126:11: error: invalid preprocessing directive #break
  126 |         # break
      |           ^~~~~
a.cc:129:11: error: invalid preprocessing directive #ans
  129 |         # ans += S*(fact/(N-i))
      |           ^~~
a.cc:130:7: error: invalid preprocessing directive #for
  130 |     # for i in range(1,N):
      |       ^~~
a.cc:131:11: error: invalid preprocessing directive #ans
  131 |         # ans*=i
      |           ^~~
a.cc:132:11: error: invalid preprocessing directive #ans
  132 |         # ans%=mod
      |           ^~~
a.cc:134:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
  134 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:12:1: error: 'import' does not name a type
   12 | import sys
      | ^~~~~~
a.cc:12:1: note: C++20 'import' only available with '-fmodules-ts'