Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
#include
int main() { char s[1000]; fgets(s, 500, stdin); int brojac = 0; int najdolg_termin = 0; int h, sec; for(int i = 0; i < strlen(s); i++) { if(s[i] == ':') { if(isdigit(s[i - 1]) && isdigit(s[i - 2]) && isdigit(s[i + 1]) && isdigit(s[i + 2])) { brojac++; int hours = (s[i - 2] - '0') * 10 + (s[i - 1] - '0'); int minutes = (s[i + 1] - '0') * 10 + (s[i + 2] - '0'); if(najdolg_termin < hours * 60 + minutes) { najdolg_termin = hours * 60 + minutes; h = hours; sec = minutes; } } } } printf("Vo tekstot ima navedneo %d vremenski termini. Najdocniot termin e %d:%d\n", brojac, h, sec); return 0; } /* Predavanjata po PiA pochnuvaat vo 08:00 chasot, a auditoriskite vezhbi pochnuvaat vo 12:00 chasot. Za laboratoriski vezhbi na raspolaganje ima tri termini: prviot od 14:00 vo 322A, vtoriot od 15:30 vo 322A i tretiot od 18:30 vo 322A */
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)