두 수의 차인 543을 빼면 된다.
Bash
bash
read year
echo $((year - 543))
1
2
2
C
c
#include <stdio.h>
int main(void) {
int year;
scanf("%d", &year);
printf("%d\n", year-543);
return 0;
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Node.js
javascript
let year = Number(require("fs").readFileSync(0).toString().trim());
console.log(year - 543);
1
2
2
PHP
php
<?php
fscanf(STDIN, "%d", $year);
echo $year - 543;
?>
1
2
3
4
2
3
4
Python3
python
print(int(input()) - 543)
1
Ruby
ruby
puts gets.chomp.to_i - 543
1
Comments
Not supported comment edit and upvote
You can do it on this page if you want.