Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Zadanie Kalkulator z bajerami
#include <iostream> #include <string.h> #include <cstdlib> using namespace std; int main() { int testy=0,x; char tab1[12]; char tab2[12]; scanf("%d",&testy); for(int i=0;i<testy;i++) { scanf("%s",tab1); if((tab1[0]<48)||(tab1[0]>57)) { scanf("%s",tab2); if((tab2[0]<48)||(tab2[0]>57)) { printf("%s%s\n", tab1, tab2); } else { int x = tab2[0] - 48; printf("%c\n", tab1[x-1]); } } else { int x = tab1[0] - 48; scanf("%s",tab2); if((tab2[0]<48)||(tab2[0]>57)) { printf("%c\n", tab2[x-1]); } else { printf("%d\n", atoi(tab1)+atoi(tab2)); } } } }
run
|
edit
|
history
|
help
0
BOOST_ENABLE_ASSERT_HANDLER defined
2015(M2)Mod.
exception
decode
dodawanie "MIECIERZY"
KMP substring search
maximum_frequent_sum
https://rextester.com/TXKE53925
Dar
BFS Basic