메뉴 건너뛰기

Programing

Code Up

1019

관리자 2019.12.03 21:29 조회 수 : 7

C언어

#include <stdio.h>

int main()

{

    int h,m,a;

    scanf("%d.%d.%d", &h,&m,&a);

    printf("%04d.%02d.%02d", h,m,a);

 

    return 0;

}

C++

#include <iostream>
int main()
{
    int h,m,a;
    cin>>h>>m>>a;
    cout << fixed;
    cout.precision(4);
cout<<h<<".";
    cout << fixed;
    cout.precision(4);
cout<<m<<".";
    cout << fixed;
    cout.precision(4);
cout<<a;
 
    return 0;
}
Python
a,b,c=input().split('.')
print('%04d' % int(a), end='.')
print('%02d' % int(b), end='.')
print('%02d' % int(c))
번호 제목 글쓴이 날짜 조회 수
공지 안내사항 관리자 2019.12.02 175
22 1024 관리자 2019.12.09 8
21 1023 관리자 2019.12.09 7
20 1022 관리자 2019.12.03 5
19 1021 관리자 2019.12.03 7
18 1020 관리자 2019.12.03 7
» 1019 관리자 2019.12.03 7
16 1018 관리자 2019.12.03 8
15 1017 관리자 2019.12.03 7
14 1015 관리자 2019.12.03 7
13 1014 관리자 2019.12.03 7
12 1013 관리자 2019.12.03 7
11 1012 관리자 2019.12.03 7
10 1011 관리자 2019.12.03 6
9 1010 관리자 2019.12.03 6
8 1008 관리자 2019.12.02 197
7 1007 관리자 2019.12.02 8
6 1006 관리자 2019.12.02 7
5 1005 관리자 2019.12.02 5
4 1004 관리자 2019.12.02 4
3 1003 관리자 2019.12.02 9
2 1002 관리자 2019.12.02 7
1 1001 관리자 2019.12.02 7
위로