fork(2) download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. char a, b;
  8. scanf("%c", &a);
  9. b=a;
  10. cout<<a<<" ";
  11. while (scanf("%c", &a)) {
  12. if (a == '\n') break;
  13. cout<<abs(2*int(a)+b)<<" ";
  14. b=a;
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0s 15240KB
stdin
The five boxing wizards jump quickly.
stdout
T 292 306 165 236 312 341 320 165 228 320 351 330 325 316 167 270 329 349 316 325 314 330 179 244 340 335 333 176 258 347 327 303 313 323 350 213