1. const fi='';//'qtdivseq.inp';
2. fo='';//'qtdivseq.out';
3. ba=1000000007;
4. maxn=1000010;
5. var n,k,m,mAss:longint;
6. a,s:array[0..1000001] of int64;
7. p,ta,r:array[0..1000001] of longint;
8. dau:array[1..1000010] of boolean;
9. res:int64;
10. procedure nhap;
11. var f:text;
12. i:longint;
13. begin
14. assign(f,fi);
15. reset(f);
17. for i:=1 to n do
18. begin
20. a[i]:=a[i]+a[i-1];
21. end;
22. close(f);
23. end;
24. procedure xl1;
25. var i,j:longint;
26. begin
27. s[k]:=0;
28. for i:=1 to n-1 do
29. if a[i]=0 then
30. inc(s[k]);
31. end;
32. procedure xl;
33. var i,j:longint;
34. begin
35. s[0]:=1;
36. for i:=1 to n-1 do
37. if a[i] mod m=0 then
38. s[a[i] div m]:=(s[a[i] div m]+s[a[i] div m-1]) mod ba;
39. res:=s[k-1];
40. end;
41. procedure tao;
42. var i,j:longint;
43. begin
44. mass:=0;
45. if s[k]<k-1 then exit;
46. for i:=2 to s[k] do
47. begin
48. if dau[i]=false then
49. begin
50. inc(mass);
51. ta[mass]:=i;
52. end;
53. j:=i+i;
54. while j<=s[k] do
55. begin
56. dau[j]:=true;
57. j:=j+i;
58. end;
59. end;
60. end;
61. procedure tinh;
62. var i,j,dem:longint;
63. begin
64. if s[k]<k-1 then exit;
65. i:=1; dem:=0;
66. while (i<=mass) and (s[k]>=ta[i]) do
67. begin
68. inc(dem);
69. r[dem]:=ta[i];
70. j:=ta[i];
71. while j<=s[k] do
72. begin
73. p[dem]:=p[dem]+s[k] div j;
74. j:=j*ta[i];
75. end;
76. inc(i);
77. end;
78. res:=1;
79. for i:=1 to dem do
80. begin
81. { p[i]:=p[i]-(k-1) div r[i];
82. p[i]:=p[i]-(s[k]-k+1) div r[i];}
83. j:=r[i];
84. while j<=k-1 do
85. begin
86. p[i]:=p[i]-(k-1) div j;
87. j:=j*r[i];
88. end;
89. j:=r[i];
90. while j<=s[k]-k+1 do
91. begin
92. p[i]:=p[i]-(s[k]-k+1) div j;
93. j:=j*r[i];
94. end;
95. for j:=1 to p[i] do
96. res:=(res*r[i]) mod ba;
97. end;
98.
99. end;
100. procedure xuat;
101. var f:text;
102. begin
103. assign(f,fo);
104. rewrite(f);
105. res:=0;
106. if a[n] mod k=0 then
107. begin
108. if a[n]=0 then
109. begin
110. xl1;
111. tao;
112. tinh;
113. end
114. else
115. begin
116. m:=a[n] div k;
117. xl;
118. end;
119. end;
120. write(f,res mod ba);
121. close(f);
122. end;
123. begin
124. nhap;
125. xuat;
126. end.
127.
128.
129.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
const fi='';//'qtdivseq.inp';
^
Main.java:1: error: class, interface, or enum expected
const fi='';//'qtdivseq.inp';
^
Main.java:1: error: empty character literal
const fi='';//'qtdivseq.inp';
^
Main.java:1: error: unclosed character literal
const fi='';//'qtdivseq.inp';
^
Main.java:2: error: empty character literal
fo='';//'qtdivseq.out';
^
Main.java:2: error: unclosed character literal
fo='';//'qtdivseq.out';
^
Main.java:4: error: class, interface, or enum expected
maxn=1000010;
^
Main.java:5: error: class, interface, or enum expected
var   n,k,m,mAss:longint;
^
Main.java:6: error: class, interface, or enum expected
a,s:array[0..1000001] of int64;
^
Main.java:7: error: class, interface, or enum expected
p,ta,r:array[0..1000001] of longint;
^
Main.java:8: error: class, interface, or enum expected
dau:array[1..1000010] of boolean;
^
Main.java:9: error: class, interface, or enum expected
res:int64;
^
Main.java:10: error: class, interface, or enum expected
procedure nhap;
^
Main.java:11: error: class, interface, or enum expected
var f:text;
^
Main.java:12: error: class, interface, or enum expected
i:longint;
^
Main.java:13: error: class, interface, or enum expected
begin
^
Main.java:15: error: class, interface, or enum expected
reset(f);
^
Main.java:16: error: class, interface, or enum expected
^
Main.java:17: error: class, interface, or enum expected
for i:=1 to n do
^
Main.java:20: error: class, interface, or enum expected
a[i]:=a[i]+a[i-1];
^
Main.java:21: error: class, interface, or enum expected
end;
^
Main.java:22: error: class, interface, or enum expected
close(f);
^
Main.java:23: error: class, interface, or enum expected
end;
^
Main.java:24: error: class, interface, or enum expected
procedure xl1;
^
Main.java:25: error: class, interface, or enum expected
var i,j:longint;
^
Main.java:26: error: class, interface, or enum expected
begin
^
Main.java:28: error: class, interface, or enum expected
for i:=1 to n-1 do
^
Main.java:31: error: class, interface, or enum expected
end;
^
Main.java:32: error: class, interface, or enum expected
procedure xl;
^
Main.java:33: error: class, interface, or enum expected
var i,j:longint;
^
Main.java:34: error: class, interface, or enum expected
begin
^
Main.java:36: error: class, interface, or enum expected
for i:=1 to n-1 do
^
Main.java:39: error: class, interface, or enum expected
res:=s[k-1];
^
Main.java:40: error: class, interface, or enum expected
end;
^
Main.java:41: error: class, interface, or enum expected
procedure tao;
^
Main.java:42: error: class, interface, or enum expected
var i,j:longint;
^
Main.java:43: error: class, interface, or enum expected
begin
^
Main.java:45: error: class, interface, or enum expected
if s[k]<k-1 then exit;
^
Main.java:46: error: class, interface, or enum expected
for i:=2 to s[k] do
^
Main.java:51: error: class, interface, or enum expected
ta[mass]:=i;
^
Main.java:52: error: class, interface, or enum expected
end;
^
Main.java:53: error: class, interface, or enum expected
j:=i+i;
^
Main.java:54: error: class, interface, or enum expected
while j<=s[k] do
^
Main.java:57: error: class, interface, or enum expected
j:=j+i;
^
Main.java:58: error: class, interface, or enum expected
end;
^
Main.java:59: error: class, interface, or enum expected
end;
^
Main.java:60: error: class, interface, or enum expected
end;
^
Main.java:61: error: class, interface, or enum expected
procedure tinh;
^
Main.java:62: error: class, interface, or enum expected
var i,j,dem:longint;
^
Main.java:63: error: class, interface, or enum expected
begin
^
Main.java:65: error: class, interface, or enum expected
i:=1;  dem:=0;
^
Main.java:65: error: class, interface, or enum expected
i:=1;  dem:=0;
^
Main.java:66: error: class, interface, or enum expected
while (i<=mass) and (s[k]>=ta[i]) do
^
Main.java:69: error: class, interface, or enum expected
r[dem]:=ta[i];
^
Main.java:70: error: class, interface, or enum expected
j:=ta[i];
^
Main.java:71: error: class, interface, or enum expected
while j<=s[k] do
^
Main.java:74: error: class, interface, or enum expected
j:=j*ta[i];
^
Main.java:75: error: class, interface, or enum expected
end;
^
Main.java:76: error: class, interface, or enum expected
inc(i);
^
Main.java:77: error: class, interface, or enum expected
end;
^
Main.java:78: error: class, interface, or enum expected
res:=1;
^
Main.java:79: error: class, interface, or enum expected
for i:=1 to dem  do
^
Main.java:82: error: class, interface, or enum expected
p[i]:=p[i]-(s[k]-k+1) div r[i];}
^
Main.java:82: error: class, interface, or enum expected
p[i]:=p[i]-(s[k]-k+1) div r[i];}
^
Main.java:84: error: class, interface, or enum expected
while j<=k-1 do
^
Main.java:87: error: class, interface, or enum expected
j:=j*r[i];
^
Main.java:88: error: class, interface, or enum expected
end;
^
Main.java:89: error: class, interface, or enum expected
j:=r[i];
^
Main.java:90: error: class, interface, or enum expected
while j<=s[k]-k+1 do
^
Main.java:93: error: class, interface, or enum expected
j:=j*r[i];
^
Main.java:94: error: class, interface, or enum expected
end;
^
Main.java:95: error: class, interface, or enum expected
for j:=1 to p[i] do
^
Main.java:97: error: class, interface, or enum expected
end;
^
Main.java:99: error: class, interface, or enum expected
end;
^
Main.java:100: error: class, interface, or enum expected
procedure xuat;
^
Main.java:101: error: class, interface, or enum expected
var f:text;
^
Main.java:102: error: class, interface, or enum expected
begin
^
Main.java:104: error: class, interface, or enum expected
rewrite(f);
^
Main.java:105: error: class, interface, or enum expected
res:=0;
^
Main.java:106: error: class, interface, or enum expected
if a[n] mod k=0 then
^
Main.java:111: error: class, interface, or enum expected
tao;
^
Main.java:112: error: class, interface, or enum expected
tinh;
^
Main.java:113: error: class, interface, or enum expected
end
^
Main.java:117: error: class, interface, or enum expected
xl;
^
Main.java:118: error: class, interface, or enum expected
end;
^
Main.java:119: error: class, interface, or enum expected
end;
^
Main.java:120: error: class, interface, or enum expected
write(f,res mod ba);
^
Main.java:121: error: class, interface, or enum expected
close(f);
^
Main.java:122: error: class, interface, or enum expected
end;
^
Main.java:123: error: class, interface, or enum expected
begin
^
Main.java:125: error: class, interface, or enum expected
xuat;
^
Main.java:126: error: class, interface, or enum expected
end.
^
92 errors
stdout
Standard output is empty