| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148132 | 8 | 小明养猪的故事 | C++ | Compile Error | 0 MS | 0 KB | 435 | 2026-02-09 17:15:39 |
#include<iostream> using namespace std; int main(){ int T; cin >> T; while (T--) { int y, m, d; scanf("%d-%d-%d", &y, &m, &d); if (m == 2 && d == 29) { cout << -1 << '\n'; continue; } long long birth = julianDay(y, m, d); long long eighteen = julianDay(y + 18, m, d); cout << eighteen - birth << '\n'; } return 0; }
Main.cc: In function 'int main()':
Main.cc:11:44: error: 'julianDay' was not declared in this scope
long long birth = julianDay(y, m, d);
^
Main.cc:8:38: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d-%d-%d", &y, &m, &d);
^