#include using namespace std; int main() { long long x, y, d, cnt; cin >> x >> y >> d; //範囲外判定 if (x + y < d) { cout << 0 << endl; return 0; } //距離0は(0,0)のみなので固定で1を出力 if (d == 0) { cout << 1 << endl; return 0; } //ループで回してカウントアップ cnt = 0; for (long long i = 0; i <= x; i++) { for (long long j = 0; j <= y; j++) { if (i + j == d) { cnt++; cout << i << "," << j << endl; } } } cout << cnt << endl; return 0; }