Skip to content

Instantly share code, notes, and snippets.

View danmarz's full-sized avatar
📚
Learning

Dan Dumitrescu danmarz

📚
Learning
View GitHub Profile
@danmarz
danmarz / IsItInTheFile.java
Last active May 16, 2020 14:12
Created with Copy to Gist
src/main/java/IsItInTheFile.java
import java.nio.file.Paths;
import java.util.Scanner;
public class IsItInTheFile {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
@danmarz
danmarz / java.time.LocalDateTime.java
Created May 15, 2020 22:22
Created with Copy to Gist
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class Item {
private String name;
private LocalDateTime createdAt;
public Item(String name) {
this.name = name;
@danmarz
danmarz / file.java
Created March 22, 2020 21:30
Created with Copy to Gist
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("================================");
for(int i=0;i<3;i++)
{
String s1=sc.next();
@danmarz
danmarz / 1584912347.java
Created March 22, 2020 21:25
Created with Copy to Gist
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("================================");
for(int i = 0; i < 3; i++) {
String s1 = sc.next();
int x = sc.nextInt();
@danmarz
danmarz / Problema_EULER_1.java
Created March 21, 2020 19:14 — forked from brunoperezm/Problema_EULER_1.java
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.
/* If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000. */
public class Problema_EULER_1{
public static void main (String[] args) {
int sum_3 = 0,
sum_5 = 0;
for (int x =1; x<=1000; x++) {
@danmarz
danmarz / Problema_OMA_3_Intercolegial.java
Created March 21, 2020 19:14 — forked from brunoperezm/Problema_OMA_3_Intercolegial.java
¿Cuántos números formados exclusivamente por los dígitos 3 y 7, y divisibles por 3 y por 7, son menores a 100000?
public class Problema_OMA_3 {
/**
* @param args
*/
public static void main(String[] args) {
/*
a) ¿Cuántos números formados exclusivamente por los dígitos 3 y 7, y divisibles por 3 y por 7, son menores a 100000?
b) ¿Cuántos números formados exclusivamente por los dígitos 3 y 7, y divisibles por 3 y por 7, son menores a 100000000?*/