A search for massive coloured resonances which are pair-produced and decay into two jets is presented. The analysis uses 36.7 fb- 1 of s = 13 TeV pp collision data recorded by the ATLAS experiment at the LHC in 2015 and 2016. No significant deviation from the background prediction is observed. Results are interpreted in a SUSY simplified model where the lightest supersymmetric particle is the top squark, t~ , which decays promptly into two quarks through R-parity-violating couplings. Top squarks with masses in the range 100GeV<mt~<410 GeV are excluded at 95% confidence level. If the decay is into a b-quark and a light quark, a dedicated selection requiring two b-tags is used to exclude masses in the ranges 100GeV<mt~<470 GeV and 480GeV<mt~<610 GeV. Additional limits are set on the pair-production of massive colour-octet resonances.