Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
8233 先明缜 11加密规则 C++ Compile Error 0 MS 0 KB 687 2025-06-19 20:57:53

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a1,a2,a3,a4,a5,a6,n; char b1; int b1,b2,b3,b4,b5,b6; cin>>n; a1=n/100000%10; a2=n/10000%10; a3=n/1000%10; a4=n/100%10; a5=n/10%10; a6=n%10; b1=(char)a1+65; if(b1%2==0){ b2=a2/2; }else{ b2=a2; } b3=(b1+b2+b3)%10; b4=a4; b5=('l'+'e')+a5%100; b6=(a1+a2+a3+a4+a5+a6)%10; cout<b1<<b2<<b3<b4<<b5<<b6; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:9: error: conflicting declaration 'int b1'
     int b1,b2,b3,b4,b5,b6;
         ^
Main.cc:9:10: error: 'b1' has a previous declaration as 'char b1'
     char b1;
          ^
Main.cc:28:9: error: no match for 'operator<' (operand types are 'std::ostream {aka std::basic_ostream}' and 'int')
     cout constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
/usr/include/c++/4.8.2/bits/stl_pair.h:220:5: note:   template argument deduction/substitution failed:
Main.cc:28:18: note:   'std::ostream {aka std::basic_ostream}' is not derived from 'const std::pair<_T1, _T2>'
     cout bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8.2/bits/stl_iterator.h:297:5: note:   template argument deduction/substitution failed:
Main.cc:28:18: note:   'std::ostream {aka std::basic_ostream}' is not derived from 'const std::reverse_iterator<_Iterator>'
     cout bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<(const reverse_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8.2/bits/stl_iterator.h:347:5: note:   template argument deduction/substitution failed:
Main.cc:28:18: note:   'std::ostream {aka std::basic_ostream}' is not derived from 'const std::reverse_iterator<_Iterator>'
     cout bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8.2/bits/stl_iterator.h:1055:5: note:   template argument deduction/substitution failed:
Main.cc:28:18: note:   'std::ostream {aka std::basic_ostream}' is not derived from 'const std::move_iterator<_Iterator>'
     cout bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator<(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8.2/bits/stl_iterator.h:1061:5: note:   template argument deduction/substitution failed:
Main.cc:28:18: note:   'std::ostream {aka std::basic_ostream}' is not derived from 'const std::move_iterator<_Iterator>'
     cout bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8.2/bits/basic_string.h:2569:5: note:   template argument deduction/substitution failed:
Main.cc:28:18: note:   'std::ostream {aka std::basic_ostream}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
     cout bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8.2/bits/basic_string.h:2581:5: note:   template argument deduction/substitution failed:
Main.cc:28:18: note:   'std::ostream {aka std::basic_ostream}' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
     cout bool std::operator<(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const _CharT* __lhs,
     ^
/usr/include/c++/4.8.2/bits/basic_string.h:2593:5: note:   template argument deduction/substitution failed:
Main.cc:28:18: note:   mismatched types 'const _CharT*' and 'std::basic_ostream'
     cout<b1<<b2<<b3<b4<<b5<<b6;
                  ^