Conditional using get_the_ID() not working [closed]

Try –

<?php if ((get_the_ID() != 50) && (get_the_ID() != 317)){ ?>

It should be AND not OR for this compare.