Domande taggate «date»

Questa sfida deve essere risolta usando, manipolando, accettando come input, producendo o calcolando le date del calendario o le ore.

2
Che data è quella di nuovo?
Sul mio sito Web, gli utenti inseriscono la loro data di nascita nello stile xx.xx.xx: tre numeri a due cifre separati da punti. Sfortunatamente, ho dimenticato di dire agli utenti esattamente quale formato utilizzare. Tutto quello che so è che una sezione viene utilizzata per il mese, una per la …
10 code-golf  date 

7
Calcola il segno zodiacale cinese
Dato che il nuovo anno cinese sta arrivando, ecco una sfida per calcolare lo zodiaco cinese, l'elemento e il Taijitu per una determinata data. L'input dovrebbe essere una data: 1/31/2014 La data usata qui è lo stile americano mm/dd/yyyy, ma in alternativa può essere lo stile ISO-8601: yyyy-mm-ddquindi lo stile …
10 code-golf  date 

6
Qual è la data, nell'ora di Usenet?
Il settembre 1993 è noto su Usenet come il settembre che non ha mai avuto fine. Pertanto, ad esempio, il giorno in cui questa domanda viene pubblicata è sabato 8740 settembre 1993. Il tuo programma o funzione dovrebbe assumere qualsiasi data gregoriana (con anno positivo) come input e restituire la …
9 code-golf  date 

10
Occorrenze di data
Dato tre numeri interi non negativi y, me d(di cui almeno uno deve essere positivo) e una data valida con un anno positivo (in qualsiasi formato ragionevole che include l'anno, mese e giorno, e nessuna informazione aggiuntiva), l'uscita data che è yanni, mmesi e dgiorni dopo la data originale. Il …
9 code-golf  date 

11
Le lancette dell'orologio del destino
Sei incatenato a una sedia. Sotto di te c'è un enorme vulcano. Un orologio di 12 ore accanto a te ticchetta minacciosamente e vedi che ha fili che conducono dal retro fino a una catena, che ti lascerà cadere al centro della terra. Legato all'orologio è una nota: Ogni lancetta …
9 code-golf  date 

5
Spuntando Quine-Bomb!
Sfida: Creare un programma o una funzione che accetta un input intero, che genera un nuovo programma / funzione come specificato di seguito. Ingresso: Numero intero n: tempo in secondi prima dell'esplosione della bomba a orologeria. Produzione: Il programma originale che aveva il tempo in secondi ncome input, produrrà un …
9 code-golf  quine  date 

1
Il calcolatore dell'orario di lavoro
Questo si basa sul modo in cui la mia azienda si occupa del monitoraggio dell'orario di lavoro di ogni dipendente. Ognuno di noi ha una carta che può essere passata davanti a un sensore, in modo che un orologio registri i tempi in cui i dipendenti effettuano il check-in o …

7
Golf gli pseudoprimi!
Introduzione / Contesto In una recente discussione nella chat crittografica sono stato sfidato a discutere / aiutare con il test di primalità di Fermat e i numeri di Carmichael. Questo test si basa sulla premessa che a^(p-1) mod p==1sarà sempre valida per i numeri primi p, ma non sempre per …
9 code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

13
Espandi catene di confronto
A differenza di molti linguaggi, Python valuta a<b<cin quanto sarebbe stato fatto nel campo della matematica, in realtà a confronto i tre numeri, al contrario di confrontare il booleano a<ba c. Il modo corretto di scrivere questo in C (e molti altri) sarebbe a<b && b<c. In questa sfida, il …
9 code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

30
Dato un input int n, stampa n * invertito (n)
Dato un numero intero n, stampan * reversed(n) reversed(n)è il numero che ottieni quando hai reversele cifre di n. reverse(512) = 215 reverse(1) = 1 reverse(101) = 101 >>>>>>>> func(5) = 5*5 = 25 func(12) = 12*21 = 252 func(11) = 11*11 = 121 func(659) = 659*956 = 630004 Vince …
9 code-golf  math  arithmetic  code-golf  math  integer  code-golf  arithmetic  integer  code-golf  sequence  base-conversion  palindrome  code-golf  math  primes  integer  code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

7
Data entro l'intervallo?
Data una MM/DDdata ( 12/24) e un intervallo di date di inizio / fine ( 11/01 - 06/24), capire se la data rientra nell'intervallo di date elencato. Gli intervalli di date possono essere sequenziali ( 05/01 - 11/01) o andare al prossimo anno ( 11/01 - 05/01). Esempi: 12/24è in …

5
Determina il tempo più occupato
Questa sfida è stata fortemente ispirata da questo post Stack Overflow . Sfida Dato un gruppo di clienti in termini di quando entrano in una stanza e quando escono, determinare il periodo (i) di tempo in cui la stanza ha un numero massimo di persone. La risoluzione temporale dovrebbe essere …
9 code-golf  date 


2
Le 10.000 parole più comuni
Questa domanda è scritta perché "Thing Explainer" è divertente da leggere e mi ha dato un'idea. Scrivi "cose ​​che fanno fare al computer cose" che legge / prende un insieme di lettere, numeri e cose del genere "#%|?e ritorna True / 1se tutte le parole fanno parte di questo insieme …
9 code-golf  string  parsing  code-golf  array-manipulation  random  permutations  code-golf  string  code-golf  parsing  code-golf  string  quine  code-golf  string  parsing  comment  code-golf  string  counting  natural-language  code-golf  string  decision-problem  code-golf  math  code-challenge  metagolf  test-battery  code-golf  string  code-golf  math  number  arithmetic  source-layout  code-golf  number  primes  decision-problem  code-golf  math  arithmetic  code-golf  date  code-golf  string  cryptography  code-golf  code-golf  chess  board-game  code-golf  geometry  grid  puzzle-solver  set-partitions  code-golf  number  natural-language  code-golf  ascii-art  code-golf  math  code-golf  string  ascii-art  kolmogorov-complexity  code-golf  string  natural-language  code-golf  game  board-game  tic-tac-toe  code-golf  ascii-art  hexagonal-grid  code-golf  string  comment  code-golf  internet  code-golf  sorting  code-golf  kolmogorov-complexity  unicode  code-golf  tips  code-golf  string  natural-language  code-golf  string  kolmogorov-complexity  source-layout  hello-world  code-golf  string  kolmogorov-complexity  counting  natural-language  code-golf  random  quine  code-golf  string  math  bitwise  code-golf  permutations  code-golf  string  code-golf  arithmetic 

3
Semplifica una data
Questo è simile alla semplificazione delle frazioni, ma con Date! L'input del programma deve essere nel formato mm/dd Ad esempio 3/4 //March 4 12/15 //December 15 1/1 // January 1 Partiamo dal presupposto che l'input sarà valido in modo che i mesi contengano questi numeri di giorni: January 31 February …

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.