Вот решение с помощью макросов:

import strutils 
const n = 7 

var res = 1 
for x in 0..<n: 
  res = MACRO(x) 

macro MACRO(x) = 
  if x mod 2 == 0: res * stdin.readline.parseInt 
  else: res + stdin.readLine.parseInt
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence