quarta-feira, 24 de outubro de 2018

URI PROBLEMA 1075 - Resto 2 SOLUÇÃO EM PYTHON

URI Online Judge | 1075
Resto 2


Adaptado por Neilor Tonin, URI BrasilTimelimit: 1


Leia um valor inteiro N. Apresente todos os números entre 1 e 10000 que divididos por N dão resto igual a 2.
Entrada


A entrada contém um valor inteiro N (N < 10000).
Saída


Imprima todos valores que quando divididos por N dão resto = 2, um por linha.



URI Online Judge | 1075

Remaining 2

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Read an integer N. Print all numbers between 1 and 10000, which divided by N will give the rest = 2.

Input

The input is an integer (< 10000)

Output

Print all numbers between 1 and 10000, which divided by n will give the rest = 2, one per line.




n = int(input())

for i in range(1,10001):
    if i % n == 2:
        print(i)

Nenhum comentário:

Postar um comentário

URI PROBLEMA 1133 - Resto da Divisão SOLUÇÃO EM C

URI Online Judge | 1133 Resto da Divisão Adaptado por Neilor Tonin, URI   Brasil Timelimit: 1 Escreva um programa que leia 2 valo...