結果
問題 |
No.530 年齢って毎年変わるし覚えるの難しいよね
|
ユーザー |
![]() |
提出日時 | 2023-06-08 11:56:32 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 424 bytes |
コンパイル時間 | 156 ms |
コンパイル使用メモリ | 28,672 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 19:16:51 |
合計ジャッジ時間 | 1,990 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 48 |
ソースコード
#include <stdio.h> /// <summary> /// 入力された数字を返す /// </summary> /// <returns></returns> int ReadNum() { int negate = 0; char c = getchar(); int num = 0; int numCnt = 0; while (c != '\n') { if (c == '-') { negate = 1; } else { num = num * 10 + c - '0'; } c = getchar(); } if (negate == 1) { num *= -1; } return num; } int main() { int y = ReadNum(); printf("%d\n",2017-y); }