Submission #1861915
Source Code Expand
#include <iostream> using namespace std; int main(){ int n,x,s=0; cin >>n; cin >>x; while(x!=0){ s+=x; if( x>n-x) { int a=x; x=t-x; t=a; } else { x=t-x; } cout <<s; } }
Submission Info
Submission Time | |
---|---|
Task | B - Mysterious Light |
User | Genius28 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 225 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:13:6: error: ‘t’ was not declared in this scope x=t-x; ^ ./Main.cpp:18:6: error: ‘t’ was not declared in this scope x=t-x; ^