Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
nomer5
var n,finish,start,a,b,nch2,nch3,nch6:longint; begin Assign(input,'input.txt'); reset(input); Assign(output,'output.txt'); rewrite(output); read(a,b); n:=b-a+1; start:=a; finish:=b; nch2:=(b-a)div 2; while(start mod 3<>0) do begin start:=start+1; end; while(finish mod 3<>0) do begin finish:=finish-1; end; nch3:=(finish div 3)-(start div 3)+1; while(a mod 6<>0) do begin a:=a+1; end; while(b mod 6<>0) do begin b:=b-1; end; nch6:=(b div 6)-(a div 6)+1; writeln(n-((nch2+nch3)-nch6)); end.
run
|
edit
|
history
|
help
0
Урок 3 задача 1 (1484) повышенная сложность.
TanTai11A2@
4
2nd tsk
practica 5 ejercicio 5
66
eliminar elemento de un arreglo
nomer6
Tableau
zadanye 4