#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#pragma GCC optimize("Ofast")
#define ll long long
using namespace std;
ll digits(ll a){
if(a == 0)
return 1;
ll cnt = 0;
while(a > 0){
a /= 10;
cnt++;
}
return cnt;
}
int main() {
ll n;
cin >> n;
ll h = n/3600;
h %= 24;
n %= 3600;
ll m = n/60;
ll s = n % 60;
cout << h << ':';
if(digits(m) == 1)
cout << 0;
cout << m << ':';
if(digits(s) == 1)
cout << 0;
cout << s;
}
на информатиксе 100 :)
DIM n AS INTEGER
INPUT "Введите кол-во студентов:", n
DIM studentYearsOld(1 TO n) AS INTEGER
DIM studentName(1 TO n) AS STRING
FOR i = 1 TO n
INPUT "Введите имя студента:", studentName(i)
INPUT "Введите год рождения студента:", studentYearsOld(i)
NEXT i
PRINT
FOR i = 1 TO n
PRINT "Студент "; studentName(i)
studentYrs = 2016 - studentYearsOld(i)
IF studentYrs < 18 THEN
PRINT "Лет до права голоса:"; 18 - studentYrs
ELSEIF studentYrs >= 18 THEN
PRINT "Студент уже имеет право голоса!"
PRINT
END IF
studentYrs = 0
NEXT i
Код валидный, если допустил ошибку во время переписывания - сообщите.