Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //part1, day1 by @neon
- #include <iostream>
- #include <vector>
- #include <sstream>
- #include <fstream>
- using namespace std;
- int main(){
- ifstream input("./input.txt");
- string strline;
- long sum = 0;
- long num;
- while(!input.eof()){
- getline(input, strline);
- if(strline == "")continue;
- stringstream ss(strline);
- ss >> num;
- sum += num / 3 - 2;
- }
- cout << sum << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement