This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # potigol.github.io | |
| # https://twitter.com/LucasTeles42/status/1514226905809100802 | |
| buracos(entrada, saída: Lista[Caractere]): Texto = | |
| se entrada.tamanho < 2 então | |
| saída.inverta.junte("") | |
| senãose entrada[2] - entrada[1] > 1 então | |
| c = (entrada[1] + 1).caractere | |
| buracos(c :: entrada.cauda, c :: saída) | |
| senão |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| area_avg|Área 1|49731.80 | |
| area_avg|Área 2|48646.04 | |
| area_max|Área 1|Aahron Galvan|99993.96 | |
| area_max|Área 2|Aakash Bracci|99884.08 | |
| area_min|Área 1|Aakash Brino|1.96 | |
| area_min|Área 2|Aakash Agosti|137.82 | |
| global_avg|49648.19 | |
| global_max|Aahron Galvan|99993.96 | |
| global_min|Aakash Brino|1.96 | |
| last_name_max|Abaine|Aakash Abaine|57682.36 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| zero = BigInt(0) | |
| var entrada = leia_texto | |
| enquanto entrada <> None.orNull faça | |
| n = BigInt(entrada) | |
| var pos = 0 | |
| enquanto zero.setBit(pos) < n faça | |
| pos := pos + 1 | |
| fim | |
| head = zero.setBit(pos) | |
| escreva "{n} {se head==n então "true {pos}" senão "false" fim}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class ParallelStreamDemo { | |
| public static void main(String[] args) { | |
| long t1, t2; | |
| List<Employee> eList = new ArrayList<Employee>(); | |
| for(int i=0; i<100; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .PHONY: run | |
| file := $(shell ls -Rt | grep \.poti | head -n1) | |
| run: | |
| @java -jar potigol.jar -c -w $(file) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var saida = java.lang.System.out; | |
| var n = -3; | |
| if (n>0) | |
| if (n<10) | |
| saida.println("A"); | |
| else | |
| saida.println("B"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fizz(numero: Inteiro) = escolha numero | |
| caso n se n mod 3 == 0 => "fizz" | |
| caso _ => "{numero}" | |
| fim | |
| buzz(numero: Inteiro) = escolha numero | |
| caso n se n mod 5 == 0 => "buzz" | |
| caso _ => "{numero}" | |
| fim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a, b, c = input().split() | |
| a = int(a) | |
| b = int(b) | |
| c = int(c) | |
| if a==b or a==c or b==c: | |
| print("S") | |
| elif a+b==c or a+c==b or b+c==a: | |
| print("S") | |
| else: | |
| print("N") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package controllers; | |
| import play.mvc.*; | |
| /** | |
| * This controller contains an action to handle HTTP requests | |
| * to the application's home page. | |
| */ | |
| public class HomeController extends Controller { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| n = int(input("Digite um numero: ")) | |
| if n % 5 == 0: | |
| print(n, "é multiplo de 5.") | |
| else: | |
| print(n, "não é multiplo de 5.") | |
| print("fim") |