submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s168543120
p00006
C++
#include <string.h> int main( void ){ char str[20]; scanf( "%s",str ); for( int i = ( strlen( str )-1 );i > 0;i-- )printf( "%c",str[i-1] ); return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'scanf' was not declared in this scope 5 | scanf( "%s",str ); | ^~~~~ a.cc:6:49: error: 'printf' was not declared in this scope 6 | for( int i = ( strlen( str )-1 );i > 0;i-- )printf( "%c",str[i-1] ); | ^~~~~~ a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 1 | #include <string.h> +++ |+#include <cstdio> 2 |
s290434210
p00006
C++
#include <stdio.h> #include <string.h> int main( void ){ char str[20]; scanf( "%s",str ); int lStr = strlen( str )-1; for( int i = 0;i < strlen( str );i++ ){ printf( "%c",str[lStr] ); return 0; }
a.cc: In function 'int main()': a.cc:11:2: error: expected '}' at end of input 11 | } | ^ a.cc:4:17: note: to match this '{' 4 | int main( void ){ | ^
s336366683
p00006
C++
#include <stdio.h> #include <string.h> int main( void ){ char str[20]; scanf( "%s",str ); int lStr = strlen( str ); for( int i = 0;i < strlen( str );i++ ){ printf( '%c',str[lStr] ); lStr--; } return 0; }
a.cc:9:17: warning: multi-character character constant [-Wmultichar] 9 | printf( '%c',str[lStr] ); | ^~~~ a.cc: In function 'int main()': a.cc:9:17: error: invalid conversion from 'int' to 'const char*' [-fpermissive] 9 | printf( '%c',str[lStr] ); | ^~~~ | | | int In file included from a.cc:1: /usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)' 363 | extern int printf (const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
s956349527
p00006
C++
#include<stdio.h> #include<string.h> void main() { char str[20],temp; int i,j=0; gets(str); i=0; j=strlen(str)-1; while(i<j) { temp=str[i]; str[i]=str[j]; str[j]=temp; i++; j--; } printf("%s",str); return(0); }
a.cc:4:1: error: '::main' must return 'int' 4 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:8:2: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(str); | ^~~~ | getw
s843353546
p00006
C++
#include<stdio.h> #include<string.h> void main() { char str[20],temp; int i,j=0; gets(str); i=0; j=strlen(str)-1; while(i<j) { temp=str[i]; str[i]=str[j]; str[j]=temp; i++; j--; } printf("%s",str); return 0; }
a.cc:4:1: error: '::main' must return 'int' 4 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:8:2: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(str); | ^~~~ | getw
s407844868
p00006
C++
#include <stdio.h> #include <string.h> #include<conio.h> int main() { char arr[100]; printf("\n"); gets(arr); strrev(arr); printf("\n%s\n",arr); return 0; }
a.cc:3:9: fatal error: conio.h: No such file or directory 3 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s305171158
p00006
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <ctime> using namespace std; //conversion //------------------------------------------ inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;} template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();} //math //------------------------------------------- template<class T> inline T sqr(T x) {return x*x;} //typedef //------------------------------------------ typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII; typedef long long LL; typedef unsigned long long ULL; //container util //------------------------------------------ #define ALL(a) (a).begin(),(a).end() #define RALL(a) (a).rbegin(), (a).rend() #define PB push_back #define MP make_pair #define SZ(a) int((a).size()) #define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i) #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) //repetition //------------------------------------------ #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) //constant //-------------------------------------------- const double EPS = 1e-10; const double PI = acos(-1.0); //clear memory #define CLR(a) memset((a), 0 ,sizeof(a)) //debug #define dump(x) cerr << #x << " = " << (x) << endl; #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl; int main() { string str; cin << str; for(int i = str.size()-1; i >= 0; i++) cout << str[i]; cout << endl; }
a.cc: In function 'int main()': a.cc:76:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 76 | cin << str; | ~~~ ^~ ~~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/vector:87, from a.cc:3: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:76:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 76 | cin << str; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from a.cc:9: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 76 | cin << str; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/istream:40, from /usr/include/c++/14/sstream:40, from a.cc:14: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 76 | cin << str; | ^~~ In file included from /usr/include/c++/14/istream:41: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 76 | cin << str; | ^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:76:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = std::__cxx11::basic_string<char>]': a.cc:76:10: required from here 76 | cin << str; | ^~~ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ In file included from a.cc:16: /usr/include/c++/14/iomanip:84:5: note: candidate: 'template<class _CharT, class _Traits> st
s582425908
p00006
C++
#include <iostream> using namespace std; int main() { string s; while(getline(cin, s)) { string res; istringstream ss(s); string c; while(ss >> c) { for(int i = c.length() - 1; i >= 0; i--) res += c[i]; res += " "; } res.erase(res.length() - 1, 1); cout << res << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:27: error: variable 'std::istringstream ss' has initializer but incomplete type 9 | istringstream ss(s); | ^
s716848715
p00006
C++
#include <stdio.h> int main(){ char str[20] = {},i; scanf("%s", str); for (i = 0; i < 20; i++){ if (str[19 - i] >0){ printf("%c", str[19-i]); } }printf("\n") return 0; }
a.cc: In function 'int main()': a.cc:11:22: error: expected ';' before 'return' 11 | }printf("\n") | ^ | ; 12 | 13 | return 0; | ~~~~~~
s690294667
p00006
C++
#include <stdio.h> #include <string.h> char str[20]; int i,len; int main(){ gets(str); len = strlen(str); for(i=len-1;i>=0;i--){ printf("%c",str[i]); } printf("\n"); retun 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(str); | ^~~~ | getw a.cc:13:9: error: 'retun' was not declared in this scope 13 | retun 0; | ^~~~~
s720828517
p00006
C++
#include <iostream> #include <string> #include <queue> int main(){ std::string str; std::queue<char> que; std::cin >> str; const int size = str.size(); for(int i = 0; i < size; ++i){ que.push(str.back()); str.erase(str.size()- 1, 1) } for(int i = 0; i < size; ++i){ std::cout << que.front(); que.pop(); } return 0; }
a.cc: In function 'int main()': a.cc:12:36: error: expected ';' before '}' token 12 | str.erase(str.size()- 1, 1) | ^ | ; 13 | } | ~
s109279098
p00006
C++
#include <stdio.h> #include<iostream> using namespace std; int main(){ char str[1000]; int length; cin>>str; length=strlen(str); for(int n=length-1;n>=0;n--){ cout<< str[n]; } return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: 'strlen' was not declared in this scope 13 | length=strlen(str); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iostream> +++ |+#include <cstring> 3 |
s610252301
p00006
C++
#include<stdio.h> #include<iostream> using namespace std; int main(){ char s[21]; cin >> s; int len=strlen(s); for(int i=0;i<(len/2);i++){ char c; c = s[i]; s[i] = s[len-i-1]; s[len-i-1] = c; } cout<<s<<"\n"; system("pause"); return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: 'strlen' was not declared in this scope 8 | int len=strlen(s); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iostream> +++ |+#include <cstring> 3 | using namespace std;
s756730503
p00006
C++
#include <stdio.h> int main() { char ch[20]; int i,j; gets(ch); j=strlen(ch); for(i=j-1;i>=0;i--) { printf("%c",ch[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(ch); | ^~~~ | getw a.cc:7:7: error: 'strlen' was not declared in this scope 7 | j=strlen(ch); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstring> 2 | int main()
s767795863
p00006
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace contest6 { class Program { static void Main(string[] args) { //空白で分割する var line_origin = Console.ReadLine(); line_origin.Reverse(); Console.WriteLine(line_origin); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:10:26: error: 'string' has not been declared 10 | static void Main(string[] args) | ^~~~~~ a.cc:10:35: error: expected ',' or '...' before 'args' 10 | static void Main(string[] args) | ^~~~ a.cc:17:6: error: expected ';' after class definition 17 | } | ^ | ; a.cc: In static member function 'static void contest6::Program::Main(int*)': a.cc:13:13: error: 'var' was not declared in this scope 13 | var line_origin = Console.ReadLine(); | ^~~ a.cc:14:13: error: 'line_origin' was not declared in this scope 14 | line_origin.Reverse(); | ^~~~~~~~~~~ a.cc:15:13: error: 'Console' was not declared in this scope 15 | Console.WriteLine(line_origin); | ^~~~~~~
s865241858
p00006
C++
#include<iostream> #include<cmath> #include<string> #include<cctype> #include<vector> #include<numeric> #include<algorithm> using namespace std; int main(){ char s[100]; scanf("%s",s); // reverse(s.begin(),s.end()); for(int i=strlen(s);i>=0;--i){ printf("%c",s[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'strlen' was not declared in this scope 13 | for(int i=strlen(s);i>=0;--i){ | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include<algorithm> +++ |+#include <cstring> 8 | using namespace std;
s170279108
p00006
C++
#include<iostream> #include<cmath> #include<string> #include<cctype> #include<vector> #include<numeric> #include<algorithm> using namespace std; int main(){ char s[100]; scanf("%s",s); // reverse(s.begin(),s.end()); for(int i=strlen(s);i>=0;--i){ printf("%c",s[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: 'strlen' was not declared in this scope 13 | for(int i=strlen(s);i>=0;--i){ | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include<algorithm> +++ |+#include <cstring> 8 | using namespace std;
s924077823
p00006
C++
#include<iostream> #include<cmath> #include<string> #include<cctype> #include<vector> #include<numeric> #include<algorithm> using namespace std; int main(){ char w[100]; // string w; scanf("%s",w); // reverse(w.begin(),w.end()); int len=strlen(w); for(int i=len;i>=0;--i){ printf("%c",w[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:15:13: error: 'strlen' was not declared in this scope 15 | int len=strlen(w); | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include<algorithm> +++ |+#include <cstring> 8 | using namespace std;
s707495362
p00006
C++
#include <iostream> #include <cstring> using namespace std; int main() { char s[21]; int n; cin >> s; n = strlen( s ); for(i=n-1;i<=0;i--) cout << s[i]; cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:8: error: 'i' was not declared in this scope 11 | for(i=n-1;i<=0;i--) | ^
s107739382
p00006
C++
#include <stdio.h> int main( void ){ char str[20]; scanf( "%s",str ); for( int i = strlen( str ) - 1;i >= 0;i-- ){ printf( "%c",str[i] ); } printf( "\n" ); return 0; }
a.cc: In function 'int main()': a.cc:6:18: error: 'strlen' was not declared in this scope 6 | for( int i = strlen( str ) - 1;i >= 0;i-- ){ | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstring> 2 |
s658175783
p00007
Java
class Main{ private static final double TAX = 1.05; public static void main(String[] args) throws IOException { double totalAmount = 100000; BigDecimal returnAmount=new BigDecimal(0); int i = Integer.parseInt(args[0]); //??\??????????????°???????????????????¢????????????? for (int count = 0; count < i; count++) { totalAmount = totalAmount * TAX; returnAmount = new BigDecimal(totalAmount).setScale(-3, BigDecimal.ROUND_UP); } //??????????????????????????? System.out.println(returnAmount.intValue()); } }
Main.java:5: error: cannot find symbol public static void main(String[] args) throws IOException { ^ symbol: class IOException location: class Main Main.java:8: error: cannot find symbol BigDecimal returnAmount=new BigDecimal(0); ^ symbol: class BigDecimal location: class Main Main.java:8: error: cannot find symbol BigDecimal returnAmount=new BigDecimal(0); ^ symbol: class BigDecimal location: class Main Main.java:14: error: cannot find symbol returnAmount = new BigDecimal(totalAmount).setScale(-3, BigDecimal.ROUND_UP); ^ symbol: variable BigDecimal location: class Main Main.java:14: error: cannot find symbol returnAmount = new BigDecimal(totalAmount).setScale(-3, BigDecimal.ROUND_UP); ^ symbol: class BigDecimal location: class Main 5 errors
s609598686
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; public class DebtHell { /** 元金 */ static final BigDecimal capital = BigDecimal.valueOf(100000); /** 利子 */ static final BigDecimal interest = BigDecimal.valueOf(0.05); /** 率 */ static final BigDecimal rate = BigDecimal.valueOf(1).add(interest); /** * プログラミングコンテスト * 初級編:Debt Hell(借金地獄) * @param args * @throws IOException */ public static void main(String[] args) throws IOException { InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String input = br.readLine(); // ユーザに入力:何週間後の借金を出力するのか int weeks = Integer.valueOf(input); // 計算結果の初期値に元金を格納 BigDecimal result = capital; for (int i = 0; i < weeks; i++) { // 利子を考慮した率をかけ、1000円未満を切り上げる result = roundUpLowerThousand(rate.multiply(result).setScale(0, BigDecimal.ROUND_UP)); } System.out.println(result); } /** * 対称の数値の1000未満を切り上げをして返却 * * @param target 対称数値 * @return 切り上げした結果 */ private static BigDecimal roundUpLowerThousand(BigDecimal target) { // 計算に使用する基準数(1000) BigDecimal basisNumber = BigDecimal.valueOf(1000); BigDecimal result = target.divide(basisNumber).setScale(0, BigDecimal.ROUND_UP); return result.multiply(basisNumber); } }
Main.java:6: error: class DebtHell is public, should be declared in a file named DebtHell.java public class DebtHell { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s922358690
p00007
Java
import java.util.Scanner; public class Main { public static void main(String args[]) { double debt = 100000.0; for(int i = 0; i< Scanner(System.in).nextInt(); i++) { debt = Math.ceil(debt * 0.00105) * 1000.0; } System.out.println(debt); } }
Main.java:6: error: cannot find symbol for(int i = 0; i< Scanner(System.in).nextInt(); i++) { ^ symbol: method Scanner(InputStream) location: class Main 1 error
s024782049
p00007
Java
import java.util.Scanner; public class Main2 { public static void main(String args[]) { double debt = 100000.0; int nWeeks = new Scanner(System.in).nextInt(); for(int i = 0; i < nWeeks; i++) { debt = Math.ceil(debt * 0.00105) * 1000.0; } System.out.println(debt); } }
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s120981387
p00007
Java
import java.util.Scanner; import java.math.BigDecimal; public class Main2 { public static void main(String args[]) { int debt = 100000; int nWeeks = Integer.parseInt(new Scanner(System.in).next()); for(int i = 0; i < nWeeks; i++) { debt = new BigDecimal(debt * 1.05).setScale(-3, BigDecimal.ROUND_CEILING).intValue(); } System.out.println(debt); } }
Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s429773103
p00007
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; /** * Debt Hell<br/> * n を入力したとき、n 週間後の借金の残高を出力し終了するプログラム。n は 100 以下とします。 <br/> * 10 万円の借金に対し、一週間ごとに 5% の利子を借金に加え、さらに借金の 1,000 円未満を切り上げます。<br/> */ public class Main2 { private static final int[] ary = { 100000, 105000, 111000, 117000, 123000, 130000, 137000, 144000, 152000, 160000, 168000, 177000, 186000, 196000, 206000, 217000, 228000, 240000, 252000, 265000, 279000, 293000, 308000, 324000, 341000, 359000, 377000, 396000, 416000, 437000, 459000, 482000, 507000, 533000, 560000, 588000, 618000, 649000, 682000, 717000, 753000, 791000, 831000, 873000, 917000, 963000, 1012000, 1063000, 1117000, 1173000, 1232000, 1294000, 1359000, 1427000, 1499000, 1574000, 1653000, 1736000, 1823000, 1915000, 2011000, 2112000, 2218000, 2329000, 2446000, 2569000, 2698000, 2833000, 2975000, 3124000, 3281000, 3446000, 3619000, 3800000, 3990000, 4190000, 4400000, 4620000, 4851000, 5094000, 5349000, 5617000, 5898000, 6193000, 6503000, 6829000, 7171000, 7530000, 7907000, 8303000, 8719000, 9155000, 9613000, 10094000, 10599000, 11129000, 11686000, 12271000, 12885000, 13530000, 14207000 }; public static void main(String args[]) throws IOException { //n週間の入力を取得 int nWeeks = Integer.parseInt(new BufferedReader(new InputStreamReader(System.in)).readLine()); System.out.println(ary[nWeeks]); } }
Main.java:10: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s297487594
p00007
Java
public class Main { public static void main(String[] args) throws Exception { //????????? final BigDecimal TAX_RATE = new BigDecimal("0.05"); //?????°?????????????????????????????¨?????? final int ROUND_UP_FRACTION = 1000; //???????????????????????????10??? int deptLeft = 100000; BufferedReader reader = new BufferedReader(new InputStreamReader( System.in)); int countWeeks = Integer.parseInt(reader.readLine()); //1??±??????????????¨??????????????????????????????????????????????¨?????????? for (int count = 1; count <= countWeeks; count++) { deptLeft = BigDecimal.valueOf(deptLeft) .add(BigDecimal.valueOf(deptLeft).multiply(TAX_RATE)) .intValue(); //1000????????????????????????????????? if (deptLeft % ROUND_UP_FRACTION != 0) { deptLeft = deptLeft + (ROUND_UP_FRACTION - deptLeft % ROUND_UP_FRACTION); } } System.out.println(deptLeft); } }
Main.java:5: error: cannot find symbol final BigDecimal TAX_RATE = new BigDecimal("0.05"); ^ symbol: class BigDecimal location: class Main Main.java:5: error: cannot find symbol final BigDecimal TAX_RATE = new BigDecimal("0.05"); ^ symbol: class BigDecimal location: class Main Main.java:11: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader( ^ symbol: class BufferedReader location: class Main Main.java:11: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader( ^ symbol: class BufferedReader location: class Main Main.java:11: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader( ^ symbol: class InputStreamReader location: class Main Main.java:16: error: cannot find symbol deptLeft = BigDecimal.valueOf(deptLeft) ^ symbol: variable BigDecimal location: class Main Main.java:17: error: cannot find symbol .add(BigDecimal.valueOf(deptLeft).multiply(TAX_RATE)) ^ symbol: variable BigDecimal location: class Main 7 errors
s180310007
p00007
Java
import java.math.BigDecimal; import java.util.Scanner; public class AOJ0007DebtHell { public static void main(String[] args) { exec(); } private static void exec() { Scanner sc = new Scanner(System.in); Integer n = sc.nextInt(); // 借金 double debt = 100000; // n週間後の借金残高計算 for (Integer i = 0; i < n; i++) { debt = debt * 1.05; } // 借金残高の1000円未満切り上げ BigDecimal bd1 = new BigDecimal(debt / 1000); BigDecimal bd2 = bd1.setScale(-1, BigDecimal.ROUND_UP); int result = bd2.intValue() * 1000; System.out.println(result); } }
Main.java:4: error: class AOJ0007DebtHell is public, should be declared in a file named AOJ0007DebtHell.java public class AOJ0007DebtHell { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s123443125
p00007
Java
public class DebtHell { public static void main(String[] args) { int result = 100000; if (!"0".equals(args[0])) { int n = Integer.parseInt(args[0]); for(int i = 0; i < n;i++){ result =(int)(result + (result * 0.05)); if((result % 1000) != 0 ){ result = ((int)(result / 1000) + 1) * 1000; } } } System.out.println(result); } }
Main.java:1: error: class DebtHell is public, should be declared in a file named DebtHell.java public class DebtHell { ^ 1 error
s259273014
p00007
Java
int n = Integer.parseInt(args[0]); // 1,000 ?????????????????????????????????????????????1,000??§?????£????????§?¨????????????? int pay_i = 100000 / 1000; for (int i = 0; i < n; i++) { float pay_f = (float) (pay_i * 1.05); pay_i = (int) (pay_i * 1.05); // ??´??°????°???°??????????¨?????????????????????? // ????????§????????´???????????°????????¨????????´???????????´??°????¨?????????????1???????????? // ??´??°?????????????¨????????????¨????????? if (pay_i != pay_f) { pay_i = pay_i + 1; } } System.out.println(pay_i*1000); return;
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. int n = Integer.parseInt(args[0]); ^ (use --enable-preview to enable unnamed classes) Main.java:6: error: class, interface, enum, or record expected for (int i = 0; i < n; i++) { ^ Main.java:6: error: class, interface, enum, or record expected for (int i = 0; i < n; i++) { ^ Main.java:6: error: class, interface, enum, or record expected for (int i = 0; i < n; i++) { ^ Main.java:8: error: class, interface, enum, or record expected pay_i = (int) (pay_i * 1.05); ^ Main.java:13: error: class, interface, enum, or record expected if (pay_i != pay_f) { ^ Main.java:15: error: class, interface, enum, or record expected } ^ Main.java:20: error: class, interface, enum, or record expected return; ^ 8 errors
s759043958
p00007
Java
import java.math.BigDecimal; /** * ??????????¨???????????????? * * @author kohei.nitta * */ public class Debt_hell { /** * ?¨??????\??????????????????????????????n??±?????????????????????????????????????????? * * @param args */ public static void main(String[] args) { BigDecimal debt = new BigDecimal("100000"); BigDecimal interest = new BigDecimal("1.05"); // n??±???????????????????¨?????????? for (int i = 1; i <= Integer.parseInt(args[0]); i++) { debt = calcDebt(debt, interest); } System.out.println(debt); } /** * ?????????????????????????????????????????? * * @param debt * @param interest * @return ?????????????????????????????????????????´?????? */ private static BigDecimal calcDebt(BigDecimal debt, BigDecimal interest) { BigDecimal roundUp = new BigDecimal("1000"); // ??????????????????1,000 ????????????????????????????????? return debt.multiply(interest).divide(roundUp, 0, BigDecimal.ROUND_UP) .multiply(roundUp); } }
Main.java:9: error: class Debt_hell is public, should be declared in a file named Debt_hell.java public class Debt_hell { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s930461759
p00007
Java
class Debt_hell { public static void main(String[] args) { BigDecimal debt = new BigDecimal("100000"); BigDecimal interest = new BigDecimal("1.05"); for (int i = 1; i <= Integer.parseInt(args[0]); i++) { debt = calcDebt(debt, interest); } System.out.println(debt); } private static BigDecimal calcDebt(BigDecimal debt, BigDecimal interest) { BigDecimal roundUp = new BigDecimal("1000"); return debt.multiply(interest).divide(roundUp, 0, BigDecimal.ROUND_UP) .multiply(roundUp); } }
Main.java:15: error: cannot find symbol private static BigDecimal calcDebt(BigDecimal debt, BigDecimal interest) { ^ symbol: class BigDecimal location: class Debt_hell Main.java:15: error: cannot find symbol private static BigDecimal calcDebt(BigDecimal debt, BigDecimal interest) { ^ symbol: class BigDecimal location: class Debt_hell Main.java:15: error: cannot find symbol private static BigDecimal calcDebt(BigDecimal debt, BigDecimal interest) { ^ symbol: class BigDecimal location: class Debt_hell Main.java:5: error: cannot find symbol BigDecimal debt = new BigDecimal("100000"); ^ symbol: class BigDecimal location: class Debt_hell Main.java:5: error: cannot find symbol BigDecimal debt = new BigDecimal("100000"); ^ symbol: class BigDecimal location: class Debt_hell Main.java:6: error: cannot find symbol BigDecimal interest = new BigDecimal("1.05"); ^ symbol: class BigDecimal location: class Debt_hell Main.java:6: error: cannot find symbol BigDecimal interest = new BigDecimal("1.05"); ^ symbol: class BigDecimal location: class Debt_hell Main.java:17: error: cannot find symbol BigDecimal roundUp = new BigDecimal("1000"); ^ symbol: class BigDecimal location: class Debt_hell Main.java:17: error: cannot find symbol BigDecimal roundUp = new BigDecimal("1000"); ^ symbol: class BigDecimal location: class Debt_hell Main.java:19: error: cannot find symbol return debt.multiply(interest).divide(roundUp, 0, BigDecimal.ROUND_UP) ^ symbol: variable BigDecimal location: class Debt_hell 10 errors
s717645578
p00007
Java
import java.util.Scanner; public class Debt_hell { public static void main(String[] args) { double debt = 100000; double interest = 1.05; double roundUp = 1000; Scanner input = new Scanner(System.in); int inputNo = input.nextInt(); for (int i = 1; i <= inputNo; i++) { debt = Math.ceil((debt * interest) / roundUp) * roundUp; } System.out.println(String.format("%.0f", debt)); input.close(); } }
Main.java:3: error: class Debt_hell is public, should be declared in a file named Debt_hell.java public class Debt_hell { ^ 1 error
s355481271
p00007
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.math.BigDecimal; /** * 借金を計算する機能 * * @author kohei.nitta * */ class Debt_hell { /** * 標準入力から値を受け取り、n週間後の借金の残高を出力する。 * * @param args * @return * @throws IOException */ public static void main(String[] args){ BigDecimal debt = new BigDecimal("100000"); BigDecimal interest = new BigDecimal("1.05"); BigDecimal roundUp = new BigDecimal("1000"); BufferedReader input = new BufferedReader(new InputStreamReader( System.in)); int inputNo = Integer.parseInt(input.readLine()); for (int i = 1; i <= inputNo; i++) { debt = debt.multiply(interest) .divide(roundUp, 0, BigDecimal.ROUND_UP).multiply(roundUp); } System.out.println(debt); } }
Main.java:29: error: unreported exception IOException; must be caught or declared to be thrown int inputNo = Integer.parseInt(input.readLine()); ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s986394854
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; /** * 借金を計算する機能 * * @author kohei.nitta * */ public class DebtHell { /** * 標準入力から値を受け取り、n週間後の借金の残高を出力する。 * * @param args * @return * @throws IOException */ public static void main(String[] args) throws IOException { BigDecimal debt = new BigDecimal("100000"); BigDecimal interest = new BigDecimal("1.05"); BigDecimal roundUp = new BigDecimal("1000"); BufferedReader input = new BufferedReader(new InputStreamReader( System.in)); int inputNo = Integer.parseInt(input.readLine()); for (int i = 1; i <= inputNo; i++) { debt = debt.multiply(interest) .divide(roundUp, 0, BigDecimal.ROUND_UP).multiply(roundUp); } System.out.println(debt); } }
Main.java:12: error: class DebtHell is public, should be declared in a file named DebtHell.java public class DebtHell { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s003617950
p00007
Java
class Main { public static void main(int week) { BigDecimal a = new BigDecimal(100000); BigDecimal b = new BigDecimal(0.05); for (int i = 0; i < week; i++) { a = a.multiply(b).setScale(-3, BigDecimal.ROUND_UP); } System.out.println(a); } }
Main.java:4: error: cannot find symbol BigDecimal a = new BigDecimal(100000); ^ symbol: class BigDecimal location: class Main Main.java:4: error: cannot find symbol BigDecimal a = new BigDecimal(100000); ^ symbol: class BigDecimal location: class Main Main.java:5: error: cannot find symbol BigDecimal b = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:5: error: cannot find symbol BigDecimal b = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:7: error: cannot find symbol a = a.multiply(b).setScale(-3, BigDecimal.ROUND_UP); ^ symbol: variable BigDecimal location: class Main 5 errors
s747998029
p00007
Java
package aizuonlinejudge; /** * @author Yuki */ public class V0007 { /*** ??????????????? */ private static double revaluation = 1000; /*** ?????? */ private static double rate = 1.05; /*** ?????? */ private static double dept = 100000; /*** ??± */ private static int week; /** * ?????????????????????<br> * ?????????????????????????????? * * @param args * ??????????????° */ public static void main(String[] args) { // ????????? week = Integer.parseInt(args[0]); // ???????????????????????? System.out.println(getTotalDept()); } /** * ?????????????????????????????? ????????????????????±???????¨??????????????¨???????????????? * * @return ??????????????? */ private static int getTotalDept() { dept = dept / revaluation; for (int i = 0; i < week; i++) { dept = Math.ceil(dept * rate); // ???????????? } return (int) (dept * revaluation); } }
Main.java:6: error: class V0007 is public, should be declared in a file named V0007.java public class V0007 { ^ 1 error
s753842857
p00007
Java
/** * @author Yuki */ public class V0007 { /*** ??????????????? */ private static double revaluation = 1000; /*** ?????? */ private static double rate = 1.05; /*** ?????? */ private static double dept = 100000; /*** ??± */ private static int week; /** * ?????????????????????<br> * ?????????????????????????????? * * @param args * ??????????????° */ public static void main(String[] args) { // ????????? week = Integer.parseInt(args[0]); // ???????????????????????? System.out.println(getTotalDept()); } /** * ?????????????????????????????? ????????????????????±???????¨??????????????¨???????????????? * * @return ??????????????? */ private static int getTotalDept() { dept = 1000; for (int i = 1; i <= week; i++) { dept = Math.ceil(dept * rate); // ???????????? } return (int) (dept * revaluation); } }
Main.java:5: error: class V0007 is public, should be declared in a file named V0007.java public class V0007 { ^ 1 error
s833974753
p00007
Java
import java.util.Scanner; public class DeptHell { // ????????????10?????? public static int LOAN = 100000; public static void main(String[] args) { // ??????????????? @SuppressWarnings("resource") Scanner input = new Scanner(System.in); // ?????????????????? double result = calc(input.nextInt()); // ????????\????????????????????? result = roundUp(result); System.out.println((int) result); } /** * ????????????????????????????¨?????????? * * @param week * ??????????????± * @return ???????????????????????? */ public static double calc(int week) { return LOAN + (LOAN * 0.05) * week; } /** * ??\?????????????????????????????\????????????????????? * * @param amount * ?????? * @return ????????\??????????????????????????? */ private static double roundUp(double amount) { // ????????\???????°???°????????? double result = amount / 10000; // ?°???°??????????????? result = Math.ceil(result); // ?????????????????????????????´ return result * 10000; } }
Main.java:3: error: class DeptHell is public, should be declared in a file named DeptHell.java public class DeptHell { ^ 1 error
s914732867
p00007
Java
import java.util.Scanner; public class DeptHell { // ????????????10?????? public static int LOAN = 100000; public static void main(String[] args) { // ??????????????? Scanner sc = new Scanner(System.in); int input = sc.nextInt(); // ?????????????????? double result = LOAN + (LOAN * 0.05) * input; // ????????\????????????????????? // ????????\???????°???°????????? result = result / 10000; // ?°???°??????????????? result = Math.ceil(result); // ????????????????????? result = result * 10000; System.out.print((int) result); } }
Main.java:3: error: class DeptHell is public, should be declared in a file named DeptHell.java public class DeptHell { ^ 1 error
s193973122
p00007
Java
import java.util.Scanner; public class DeptHell { // ????????????10?????? public static int LOAN = 100000; public static void main(String[] args) { // ??????????????? @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); int input = sc.nextInt(); // ?????????????????? double result = LOAN + (LOAN * 0.05) * input; // ????????\????????????????????? // ????????\???????°???°????????? result = result / 10000; // ?°???°??????????????? result = Math.ceil(result); // ????????????????????? result = result * 10000; System.out.print((int) result); } }
Main.java:3: error: class DeptHell is public, should be declared in a file named DeptHell.java public class DeptHell { ^ 1 error
s366830805
p00007
Java
import java.util.Scanner; public class DeptHell { // ????????????10?????? public static int LOAN = 100000; public static void main(String[] args) { // ??????????????? @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); int input = sc.nextInt(); double result = LOAN; // ?????±??????????¨???? for (int i = 0; input > i; i++) { // ?????????????????? result = result * 1.05; // ????????\????????????????????? // ????????\???????°???°????????? result = result / 1000; // ?°???°??????????????? result = Math.ceil(result); // ????????????????????? result = result * 1000; } System.out.print((int) result); } }
Main.java:3: error: class DeptHell is public, should be declared in a file named DeptHell.java public class DeptHell { ^ 1 error
s460673483
p00007
Java
class Main { public void main(int week) { BigDecimal shakkin = new BigDecimal(100000); BigDecimal taxper = new BigDecimal(0.05); BigDecimal rishi; int a = 0; for (int i = 0; i <= week; i++) { // 5%の利子を計算する rishi = shakkin.multiply(taxper); // 5%の利子を元金に足す shakkin = shakkin.add(rishi); // 1000円未満を切り上げる a = shakkin.setScale(-3, BigDecimal.ROUND_UP).intValue(); } System.out.println(a); } }
Main.java:4: error: cannot find symbol BigDecimal shakkin = new BigDecimal(100000); ^ symbol: class BigDecimal location: class Main Main.java:4: error: cannot find symbol BigDecimal shakkin = new BigDecimal(100000); ^ symbol: class BigDecimal location: class Main Main.java:5: error: cannot find symbol BigDecimal taxper = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:5: error: cannot find symbol BigDecimal taxper = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:6: error: cannot find symbol BigDecimal rishi; ^ symbol: class BigDecimal location: class Main Main.java:15: error: cannot find symbol a = shakkin.setScale(-3, BigDecimal.ROUND_UP).intValue(); ^ symbol: variable BigDecimal location: class Main 6 errors
s216123202
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; public class Main { public static void main(String[] args) throws IOException { // 宣言 BigDecimal shakkin = new BigDecimal(100000); BigDecimal taxper = new BigDecimal(0.05); BigDecimal rishi; int output = 0; // 文字列の入力 BufferedReader input = new BufferedReader(new InputStreamReader(System.in), 1); int week = Integer.parseInt(input.readLine()); //金額計算 for (int i = 0; i <= week; i++) { // 5%の利子を計算する rishi = shakkin.multiply(taxper); // 5%の利子を元金に足す shakkin = shakkin.add(rishi); } // 1000円未満を切り上げる output = shakkin.setScale(-3, BigDecimal.ROUND_UP).intValue(); System.out.println(output); }
Main.java:29: error: reached end of file while parsing } ^ 1 error
s340228137
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * @author Yuki */ public class V0007 { /*** 利子 */ private final static double INTEREST = 1.05; /*** 切り上げ額 */ private final static double REVALUATION = 1000; /*** 借金 */ private static int debt = 100000; /*** 文字型入力ストリーム(標準入力) */ private static BufferedReader br; /*** 週 */ private static int weekNum; /*** 初期化 */ static { br = new BufferedReader(new InputStreamReader(System.in)); } /** * メインメソッド<br> * 借金の残高を出力する * */ public static void main(String[] args) throws IOException { weekNum = Integer.parseInt(br.readLine()); // 週を取得 System.out.println(getTotalDept()); // 借金の残高の出力 } /** * 借金の残高を取得する 利子をかけた週の合計の借金を計算して返す * * @return 借金の残高 */ private static int getTotalDept() { double debtTemp = debt / REVALUATION; for (; weekNum > 0; weekNum--) { debtTemp = Math.ceil(debtTemp * INTEREST); // 切り上げ } return (int) (debtTemp * REVALUATION); } }
Main.java:8: error: class V0007 is public, should be declared in a file named V0007.java public class V0007 { ^ 1 error
s721349240
p00007
Java
import java.util.Scanner; public class main { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scn = new Scanner(System.in); int n = scn.nextInt(); int debt = 100; for (int i = 0; i < n; i++) { debt = (int)Math.ceil(debt * 1.05); } System.out.println(debt * 1000); } }
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s102704916
p00007
Java
import java.util.Scanner; public class main { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scn = new Scanner(System.in); int n = scn.nextInt(); int debt = 100; for (int i = 0; i < n; i++) { debt = (int)Math.ceil(debt * 1.05); } System.out.println(debt * 1000); } }
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s175062309
p00007
Java
import java.util.Scanner; public class main { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scn = new Scanner(System.in); int n = scn.nextInt(); int debt = 100; for (int i = 0; i < n; i++) { debt = (int)Math.ceil(debt * 1.05); } System.out.println(debt * 1000); } }
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s791769679
p00007
Java
import java.util.Scanner; public class DebtHell { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scn = new Scanner(System.in); int n = scn.nextInt(); int debt = 100; for (int i = 0; i < n; i++) { debt = (int)Math.ceil(debt * 1.05); } System.out.println(debt * 1000); } }
Main.java:4: error: class DebtHell is public, should be declared in a file named DebtHell.java public class DebtHell { ^ 1 error
s767877578
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main01 { /** 週利 */ private static final double INTEREST_WEEK = 0.05; /** 繰り上げ単位 */ private static final int ROUND_UP_UNIT = 1000; /** 元金 */ private static final int PRINCIPAL = 100000; public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(System.in)); int intInputWeek = Integer.parseInt(bufferedReader.readLine()); // 借金計算 double totalDebt = calcDebt(PRINCIPAL, intInputWeek); System.out.println((int) totalDebt); } /** * 借金計算メソッド(週利0.05%) * @param debt 現在の借金 * @param week 現在の残り週 * @return 借金額 */ private static double calcDebt(double debt, int week) { if (week == 0) { return debt; } debt *= 1 + INTEREST_WEEK; // 1000円未満は切り上げる double debtPlus = debt / ROUND_UP_UNIT - (int) (debt / ROUND_UP_UNIT); if (debtPlus > 0) debt = debt + ROUND_UP_UNIT - debtPlus * ROUND_UP_UNIT; return calcDebt(debt, --week); } }
Main.java:5: error: class Main01 is public, should be declared in a file named Main01.java public class Main01 { ^ 1 error
s512593603
p00007
Java
class Main{ public static final int DEPT = 100000; public static final BigDecimal INTEREST = new BigDecimal(0.05); public static void main(String[] args) { Scanner s = new Scanner(System.in); int week = Integer.parseInt(s.next()); BigDecimal repay = new BigDecimal(DEPT); for (int i = 0; i < week; ++i) { repay = repay.add(repay.multiply(INTEREST)); } s.close(); System.out.println(repay.setScale(0, BigDecimal.ROUND_HALF_UP)); } }
Main.java:5: error: cannot find symbol public static final BigDecimal INTEREST = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:5: error: cannot find symbol public static final BigDecimal INTEREST = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:8: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:11: error: cannot find symbol BigDecimal repay = new BigDecimal(DEPT); ^ symbol: class BigDecimal location: class Main Main.java:11: error: cannot find symbol BigDecimal repay = new BigDecimal(DEPT); ^ symbol: class BigDecimal location: class Main Main.java:18: error: cannot find symbol System.out.println(repay.setScale(0, BigDecimal.ROUND_HALF_UP)); ^ symbol: variable BigDecimal location: class Main 7 errors
s041442868
p00007
Java
class Main{ public static final int DEPT = 100000; public static final BigDecimal INTEREST = new BigDecimal(0.05); public static void main(String[] args) { Scanner s = new Scanner(System.in); int week = Integer.parseInt(s.next()); BigDecimal repay = new BigDecimal(DEPT); for (int i = 0; i < week; ++i) { repay = repay.add(repay.multiply(INTEREST)); } s.close(); System.out.println(repay.setScale(0, BigDecimal.ROUND_HALF_UP)); } }
Main.java:3: error: cannot find symbol public static final BigDecimal INTEREST = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:3: error: cannot find symbol public static final BigDecimal INTEREST = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:5: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol BigDecimal repay = new BigDecimal(DEPT); ^ symbol: class BigDecimal location: class Main Main.java:7: error: cannot find symbol BigDecimal repay = new BigDecimal(DEPT); ^ symbol: class BigDecimal location: class Main Main.java:12: error: cannot find symbol System.out.println(repay.setScale(0, BigDecimal.ROUND_HALF_UP)); ^ symbol: variable BigDecimal location: class Main 7 errors
s593698067
p00007
Java
class Main { public static final int DEPT = 100000; public static final BigDecimal INTEREST = new BigDecimal(0.05); public static void main(String[] args) { Scanner s = new Scanner(System.in); int week = Integer.parseInt(s.next()); BigDecimal repay = new BigDecimal(DEPT); for (int i = 0; i < week; ++i) { repay = repay.add(repay.multiply(INTEREST)); } s.close(); System.out.println(repay.divide(new BigDecimal(10000), 0, BigDecimal.ROUND_CEILING).multiply(new BigDecimal(10000))); } }
Main.java:5: error: cannot find symbol public static final BigDecimal INTEREST = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:5: error: cannot find symbol public static final BigDecimal INTEREST = new BigDecimal(0.05); ^ symbol: class BigDecimal location: class Main Main.java:8: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:11: error: cannot find symbol BigDecimal repay = new BigDecimal(DEPT); ^ symbol: class BigDecimal location: class Main Main.java:11: error: cannot find symbol BigDecimal repay = new BigDecimal(DEPT); ^ symbol: class BigDecimal location: class Main Main.java:20: error: cannot find symbol BigDecimal.ROUND_CEILING).multiply(new BigDecimal(10000))); ^ symbol: class BigDecimal location: class Main Main.java:19: error: cannot find symbol System.out.println(repay.divide(new BigDecimal(10000), 0, ^ symbol: class BigDecimal location: class Main Main.java:20: error: cannot find symbol BigDecimal.ROUND_CEILING).multiply(new BigDecimal(10000))); ^ symbol: variable BigDecimal location: class Main 9 errors
s735054493
p00007
Java
import java.math.BigDecimal; import java.util.Scanner; public class test1 { public static final int DEPT = 100000; public static final BigDecimal INTEREST = new BigDecimal(0.05); public static void main(String[] args) { Scanner s = new Scanner(System.in); int week = Integer.parseInt(s.next()); BigDecimal repay = new BigDecimal(DEPT); for (int i = 0; i < week; ++i) { repay = repay.add(repay.multiply(INTEREST)); } s.close(); System.out.println(repay.divide(new BigDecimal(10000), 0, BigDecimal.ROUND_CEILING).multiply(new BigDecimal(10000))); } }
Main.java:4: error: class test1 is public, should be declared in a file named test1.java public class test1 { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s739162316
p00007
Java
import java.math.BigDecimal; import java.util.Scanner; public class test1 { public static final int DEPT = 100000; public static final BigDecimal INTEREST = new BigDecimal(0.05); public static void main(String[] args) { Scanner s = new Scanner(System.in); int week = Integer.parseInt(s.next()); BigDecimal repay = new BigDecimal(DEPT); for (int i = 0; i < week; ++i) { repay = repay.add(repay.multiply(INTEREST)); } s.close(); System.out.println(repay.divide(new BigDecimal(10000), 0, BigDecimal.ROUND_CEILING).multiply(new BigDecimal(10000))); } }
Main.java:4: error: class test1 is public, should be declared in a file named test1.java public class test1 { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s095546456
p00007
Java
import java.math.BigDecimal; import java.util.Scanner; public class test1 { public static final int DEPT = 100000; public static final BigDecimal INTEREST = new BigDecimal(0.05); public static void main(String[] args) { Scanner s = new Scanner(System.in); int week = Integer.parseInt(s.next()); BigDecimal repay = new BigDecimal(DEPT); for (int i = 1; i < week; ++i) { repay = repay.add(repay.multiply(INTEREST)); } s.close(); System.out.println(repay.setScale(-4, BigDecimal.ROUND_CEILING) .toPlainString()); } }
Main.java:3: error: class test1 is public, should be declared in a file named test1.java public class test1 { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s962199906
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; public class money { public static void main(String[] args) throws IOException { System.out.println("??´??°?????\????????????????????????"); //Input ??´??°?????\????????? BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); int n = Integer.parseInt(str); //?????? double loan = 100000; //??\???????????´??°?????????????????????????±??????? //1??±?????¨???????????????????????????????????????????????\?????? for(int i=1; i<=n; i++){ //?????????5%????????????????????? loan = loan * 1.05; //?????????1000??????????????????????????? BigDecimal bd = new BigDecimal(String.valueOf(loan)); //?¬¬1?????°???0?????´???????°???°?¬¬?????????????????????(??????) //1000??????????????????????????????????¬¬1?????°???-3??¨???????????????????????????????????? loan = bd.setScale(-3, BigDecimal.ROUND_UP).doubleValue(); } //??¨???????????????????°???°??????????????¢??§????????????????????????????????????int??????result???????´??????? int result = (int) loan; System.out.println(result); } }
Main.java:10: error: illegal escape character System.out.println("???????????\????????????????????????"); ^ 1 error
s082477618
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; public class money { public static void main(String[] args) throws IOException { //Input ??´??°?????\????????? BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); int n = Integer.parseInt(str); //?????? double loan = 100000; //??\???????????´??°?????????????????????????±??????? //1??±?????¨???????????????????????????????????????????????\?????? for(int i=1; i<=n; i++){ //?????????5%????????????????????? loan = loan * 1.05; //?????????1000??????????????????????????? BigDecimal bd = new BigDecimal(String.valueOf(loan)); //?¬¬1?????°???0?????´???????°???°?¬¬?????????????????????(??????) //1000??????????????????????????????????¬¬1?????°???-3??¨???????????????????????????????????? loan = bd.setScale(-3, BigDecimal.ROUND_UP).doubleValue(); } //??¨???????????????????°???°??????????????¢??§????????????????????????????????????int??????result???????´??????? int result = (int) loan; System.out.println(result); } }
Main.java:7: error: class money is public, should be declared in a file named money.java public class money { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s024371838
p00007
Java
public class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //外部入力取り込んだ借金をしている期間(週単位) int week = Integer.parseInt(in.readLine()); //借金 double debt = 100000; //利子 double interest = 1.05; //借金の計算 for (int i = 0; i < week; i++) { //一週間ごとに 借金に5% の利子を借金に加える debt = debt * interest; //借金の 1,000 円未満を切り上げ debt = Math.ceil(debt/1000); debt = debt * 1000; } //計算後の借金を整数として外部出力 System.out.println((int)debt); } }
Main.java:2: error: cannot find symbol public static void main(String[] args) throws IOException { ^ symbol: class IOException location: class Main Main.java:3: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:3: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:3: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class InputStreamReader location: class Main 4 errors
s824707785
p00007
Java
public class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //外部入力取り込んだ借金をしている期間(週単位) int week = Integer.parseInt(in.readLine()); //借金 double debt = 100000; //利子 double interest = 1.05; //借金の計算 for (int i = 0; i < week; i++) { //一週間ごとに 借金に5% の利子を借金に加える debt = debt * interest; //借金の 1,000 円未満を切り上げ debt = Math.ceil(debt/1000); debt = debt * 1000; } //計算後の借金を整数として外部出力 System.out.println((int)debt); } }
Main.java:2: error: cannot find symbol public static void main(String[] args) throws IOException { ^ symbol: class IOException location: class Main Main.java:3: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:3: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:3: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class InputStreamReader location: class Main 4 errors
s253238227
p00007
Java
mport java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //外部入力取り込んだ借金をしている期間(週単位) int week = Integer.parseInt(in.readLine()); //借金 double debt = 100000; //利子 double interest = 1.05; //借金の計算 for (int i = 0; i < week; i++) { //一週間ごとに 借金に5% の利子を借金に加える debt = debt * interest; //借金の 1,000 円未満を切り上げ debt = Math.ceil(debt/1000); debt = debt * 1000; } //計算後の借金を整数として外部出力 System.out.println((int)debt); } }
Main.java:1: error: class, interface, enum, or record expected mport java.io.BufferedReader; ^ Main.java:2: error: class, interface, enum, or record expected import java.io.IOException; ^ Main.java:3: error: class, interface, enum, or record expected import java.io.InputStreamReader; ^ 3 errors
s580846373
p00007
Java
class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //外部入力取り込んだ借金をしている期間(週単位) int week = Integer.parseInt(in.readLine()); //借金 double debt = 100000; //利子 double interest = 1.05; //借金の計算 for (int i = 0; i < week; i++) { //一週間ごとに 借金に5% の利子を借金に加える debt = debt * interest; //借金の 1,000 円未満を切り上げ debt = Math.ceil(debt/1000); debt = debt * 1000; } //計算後の借金を整数として外部出力 System.out.println((int)debt); } }
Main.java:2: error: cannot find symbol public static void main(String[] args) throws IOException { ^ symbol: class IOException location: class Main Main.java:3: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:3: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:3: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class InputStreamReader location: class Main 4 errors
s086696795
p00007
Java
import java.util.Scanner; public class Mein { // 借金額:10万円 public static int LOAN = 100000; public static void main(String[] args) { // インプット @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); int input = sc.nextInt(); double result = LOAN; // 一週間ずつ計算 for (int i = 0; input > i; i++) { // 利子を加える result = result * 1.05; // 1000で割り、千円以下を切り上げ result = Math.ceil(result / 1000); // 金額を元に戻す result = result * 1000; } System.out.println((int) result); } }
Main.java:3: error: class Mein is public, should be declared in a file named Mein.java public class Mein { ^ 1 error
s734559371
p00007
Java
public class Main03 { public static void main(String[] args) { } /** * index番目のグループの到着時刻を返却する(正午からの経過時間) * 単位:分 * @param index * @return 到着時刻 */ private static int getArriveTime(int index) { return index * 5; } /** * index番目のグループの人数を返却する * 単位:人 * @param index * @return 人数 */ private static int getNums(int index) { return((index % 5 == 1) ? 5 : 2); } /** * index番目のグループの所要時間を返却する * 単位:分 * @param index * @return 所要時間 */ private static int getEatingTime(int index) { return 17 * (index % 2) + 3 * (index % 3) + 19; } private static boolean checkSheet(int[] sheets, int index, int custmors) { boolean canSit = true; for (int i = 0; i < sheets.length; i++) { for (int j = i; j < custmors; j++) { if (j + custmors <= sheets.length) { if (sheets[j] != 100) { canSit = false; } } } if (canSit) { for (int j = i; j < custmors; j++) { sheets[j] = index; } } } } }
Main.java:1: error: class Main03 is public, should be declared in a file named Main03.java public class Main03 { ^ 1 error
s962511164
p00007
Java
public class Main { public static void main(String[] args) { } /** * index番目のグループの到着時刻を返却する(正午からの経過時間) * 単位:分 * @param index * @return 到着時刻 */ private static int getArriveTime(int index) { return index * 5; } /** * index番目のグループの人数を返却する * 単位:人 * @param index * @return 人数 */ private static int getNums(int index) { return((index % 5 == 1) ? 5 : 2); } /** * index番目のグループの所要時間を返却する * 単位:分 * @param index * @return 所要時間 */ private static int getEatingTime(int index) { return 17 * (index % 2) + 3 * (index % 3) + 19; } private static boolean checkSheet(int[] sheets, int index, int custmors) { boolean canSit = true; for (int i = 0; i < sheets.length; i++) { for (int j = i; j < custmors; j++) { if (j + custmors <= sheets.length) { if (sheets[j] != 100) { canSit = false; } } } if (canSit) { for (int j = i; j < custmors; j++) { sheets[j] = index; } } } } }
Main.java:56: error: missing return statement } ^ 1 error
s805766061
p00007
Java
import java.util.Scanner; import java.math.BigDecimal; import java.math.RoundingMode; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int w=sc.nextInt(); double a=100000; for(int i=0;i<w;i++){ a=a*1.05; BigDecimal x=new BigDecimal(a); x=x/1000; x=x.setScale(0,RoundingMode.CEILING); a=x.doubleValue()*1000; } System.out.println(a); } }
Main.java:13: error: bad operand types for binary operator '/' x=x/1000; ^ first type: BigDecimal second type: int 1 error
s019486378
p00007
Java
import java.util.Scanner; import java.math.BigDecimal; import java.math.RoundingMode; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int w=sc.nextInt(); int a=100000; for(int i=0;i<w;i++){ a=a*1.05; double b=a/1000; BigDecimal x=new BigDecimal(b); x=x.setScale(0,RoundingMode.CEILING); a=x.intValue()*1000; } System.out.println(a); } }
Main.java:11: error: incompatible types: possible lossy conversion from double to int a=a*1.05; ^ 1 error
s295370392
p00007
Java
import java.util.Scanner; import java.math.BigDecimal; import java.math.RoundingMode; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int w=sc.nextInt(); int a=100000; for(int i=0;i<w;i++){ a+=a/20; BigDecimal x=new BigDecimal(a); a=x.setScale(-3,RoundingMode.CEILING); } System.out.println(a); } }
Main.java:13: error: incompatible types: BigDecimal cannot be converted to int a=x.setScale(-3,RoundingMode.CEILING); ^ 1 error
s635539280
p00007
Java
import java.util.Scanner; import java.math.BigDecimal; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int w=sc.nextInt(); int a=100000; for(int i=0;i<w;i++){ a+=a/20; BigDecimal x=new BigDecimal(a); x=x.setScale(-3,Round_UP); } System.out.println(a); } }
Main.java:12: error: cannot find symbol x=x.setScale(-3,Round_UP); ^ symbol: variable Round_UP location: class Main 1 error
s045936395
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; //n??±?????????????????????????±?????????? public class AizuONLINEDbethell { public static void main(String[] args){ double syakkin = 100000;//?????????????????????10??? System.out.println("?????±????????£??????"); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); try{ String line = in.readLine(); //??°????????? int w = Integer.parseInt(line); for(int i = 1; i <= w; i++){ syakkin = Math.ceil((syakkin * 1.05)/10000)*10000; } }catch(IOException e){ System.out.println(e); }catch(NumberFormatException e){ System.out.println("??°????????\????????????????????????"); } System.out.println(syakkin); } }
Main.java:27: error: illegal escape character System.out.println("???????????\????????????????????????"); ^ 1 error
s598158394
p00007
Java
public class Main { public static void main(String args[]) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int result = 100000; int rishi = 5; int n = Integer.parseInt(br.readLine()); for(int i = 0; i < n; i++){ result = result + (result*rishi/100); } while(result % 10000 != 0){ result++; } System.out.println(result); } }
Main.java:4: error: cannot find symbol public static void main(String args[]) throws NumberFormatException, IOException { ^ symbol: class IOException location: class Main Main.java:5: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:5: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:5: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class InputStreamReader location: class Main 4 errors
s060675193
p00007
Java
import java.util.Scanner; 2 3 public class Main { 4 public static void main(String[] args) { 5 Scanner scn = new Scanner(System.in); 6 int n = scn.nextInt(); 7 int debt = 100; 8 for (int i = 0; i < n; i++) { 9 debt = (int)Math.ceil(debt * 1.05); 10 } 11 System.out.println(debt * 1000); 12 } 13 }
Main.java:2: error: class, interface, enum, or record expected 2 ^ Main.java:5: error: illegal start of type 4 public static void main(String[] args) { ^ Main.java:6: error: not a statement 5 Scanner scn = new Scanner(System.in); ^ Main.java:6: error: ';' expected 5 Scanner scn = new Scanner(System.in); ^ Main.java:7: error: not a statement 6 int n = scn.nextInt(); ^ Main.java:7: error: ';' expected 6 int n = scn.nextInt(); ^ Main.java:8: error: not a statement 7 int debt = 100; ^ Main.java:8: error: ';' expected 7 int debt = 100; ^ Main.java:9: error: not a statement 8 for (int i = 0; i < n; i++) { ^ Main.java:9: error: ';' expected 8 for (int i = 0; i < n; i++) { ^ Main.java:10: error: not a statement 9 debt = (int)Math.ceil(debt * 1.05); ^ Main.java:10: error: ';' expected 9 debt = (int)Math.ceil(debt * 1.05); ^ Main.java:11: error: not a statement 10 } ^ Main.java:11: error: ';' expected 10 } ^ Main.java:12: error: not a statement 11 System.out.println(debt * 1000); ^ Main.java:12: error: ';' expected 11 System.out.println(debt * 1000); ^ Main.java:13: error: not a statement 12 } ^ Main.java:13: error: ';' expected 12 } ^ Main.java:14: error: illegal start of type 13 } ^ 19 errors
s072709113
p00007
Java
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner in = new Scanner(System.in); int inputNum = in.nextDouble(); System.out.println(getNowShakkin(inputNum)); } public static int getKiriage1000(double shakkin) { double result = shakkin; result = (int) (Math.ceil((double) result / 1000) * 1000); return result; } public static double getNowShakkin(int weekInterval) { double result = 100000; double rishi = 0.05; for (int i = 0; i < weekInterval; i++) { result = result + (result * rishi); } result = getKiriage1000(result); return result; } }
Main.java:8: error: incompatible types: possible lossy conversion from double to int int inputNum = in.nextDouble(); ^ Main.java:17: error: incompatible types: possible lossy conversion from double to int return result; ^ 2 errors
s084342250
p00007
Java
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner in = new Scanner(System.in); int inputNum = in.nextInt(); System.out.println(getNowShakkin(inputNum)); } public static int getKiriage1000(double shakkin) { double result = shakkin; result = (int) (Math.ceil((double) result / 1000) * 1000); return result; } public static int getNowShakkin(int weekInterval) { double result = 100000; double rishi = 0.05; for (int i = 0; i < weekInterval; i++) { result = result + (result * rishi); } result = getKiriage1000(result); return result; } }
Main.java:17: error: incompatible types: possible lossy conversion from double to int return result; ^ Main.java:30: error: incompatible types: possible lossy conversion from double to int return result; ^ 2 errors
s587505479
p00007
Java
public static void main(String args[]) { Scanner in = new Scanner(System.in); int inputNum = in.nextInt(); System.out.println(getNowShakkin(inputNum)); } public static int getNowShakkin(int weekInterval) { double result = 100; for (int i = 0; i < weekInterval; i++) { result = result + (result * 0.05); result = (Math.ceil((double) result)); } return (int)result * 1000; } }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String args[]) { ^ (use --enable-preview to enable unnamed classes) Main.java:17: error: class, interface, enum, or record expected } ^ 2 errors
s117294999
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String input = br.readLine(); int week = Integer.parseInt(input); int loan = 100000; for(int i = 1;i <= week;i++){ loan = (loan * 1.05); if(loan % 1000 != 0){ loan += 1000 - loan % 1000; } } System.out.println(loan); } }
Main.java:12: error: incompatible types: possible lossy conversion from double to int loan = (loan * 1.05); ^ 1 error
s176627612
p00007
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ int n = scan.nextInt(); long mon = 100_000; while(n != 0){ mon = Math.ceil(m * 1.05); n--; } System.out.printf("%d\n", mon); } }
Main.java:10: error: cannot find symbol mon = Math.ceil(m * 1.05); ^ symbol: variable m location: class Main 1 error
s979149326
p00007
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ int n = scan.nextInt(); long mon = 100_000; while(n != 0){ mon = Math.ceil(mon * 1.05); n--; } System.out.printf("%d\n", mon); } }
Main.java:10: error: incompatible types: possible lossy conversion from double to long mon = Math.ceil(mon * 1.05); ^ 1 error
s502093144
p00007
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ int n = scan.nextInt(); long mon = 100_000; for(int i = 0; i < n; i++){ mon = Math.ceil(mon * 1.05 / 1000) * 1000; } System.out.printf("%d\n", mon); } }
Main.java:10: error: incompatible types: possible lossy conversion from double to long mon = Math.ceil(mon * 1.05 / 1000) * 1000; ^ 1 error
s954423418
p00007
Java
public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int week = scan.nextInt(); double debt = 100000; for(int i = 0; i < week; i++){ debt = debt * 1.05 / 1000; debt = Math.ceil(debt); debt = debt * 1000; } int ans = (int)debt; System.out.println(ans); } }
Main.java:4: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s169886677
p00007
Java
import java.io.BufferedReader; import java.io.InputStreamReader class Main{ public static void main(String[] a) { String line = ""; try { BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in)); line = stdReader.readLine(); stdReader.close(); } catch (Exception e) { e.getStackTrace(); System.exit(-1); // ????????°??????????????? } // TODO ????????????????????????????????????????????? int debt = 100000; int n = 0; n = Integer.parseInt(line); for(int i=0;i<n;i++){ debt = interest(debt); } System.out.println(debt); } public static int interest(int n){ double added; added = n * 1.05; added = 1000*Math.ceil(added/1000); return (int)added; } }
Main.java:2: error: ';' expected import java.io.InputStreamReader ^ 1 error
s783242104
p00007
Java
import java.io.BufferedReader; import java.io.InputStreamReader class Main{ public static void main(String[] a) { String line = ""; try { BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in)); line = stdReader.readLine(); stdReader.close(); } catch (Exception e) { e.getStackTrace(); System.exit(-1); // ????????°??????????????? } // TODO ????????????????????????????????????????????? int debt = 100000; int n = 0; n = Integer.parseInt(line); for(int i=0;i<n;i++){ debt = interest(debt); } System.out.println(debt); } public static int interest(int n){ double added; added = n * 1.05; added = 1000*Math.ceil(added/1000); return (int)added; } }
Main.java:2: error: ';' expected import java.io.InputStreamReader ^ 1 error
s582918313
p00007
Java
import java.io.BufferedReader; import java.io.InputStreamReader class Main{ public static void main(String[] a) { String line = ""; try { BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in)); line = stdReader.readLine(); stdReader.close(); } catch (Exception e) { e.getStackTrace(); System.exit(-1); // ????????°??????????????? } // TODO ????????????????????????????????????????????? int debt = 100000; int n = 0; n = Integer.parseInt(line); for(int i=0;i<n;i++){ debt = interest(debt); } System.out.println(debt); } public static int interest(int n){ double added; added = n * 1.05; added = 1000*Math.ceil(added/1000); return (int)added; } }
Main.java:2: error: ';' expected import java.io.InputStreamReader ^ 1 error
s973481956
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); double sum = 100000; //????????????10?????? int ??? = 0; //?????????????????±??? ??? = Integer.parseInt(br.readLine()); for(int i = 0; i < ???; i++){ sum = sum * 1.05; sum = sum / 1000; sum = Math.ceil(sum) * 1000; } System.out.println(sum); } }
Main.java:10: error: not a statement int ??? = 0; //????????????????????? ^ Main.java:10: error: ';' expected int ??? = 0; //????????????????????? ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: : expected ??? = Integer.parseInt(br.readLine()); ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ 11 errors
s000041119
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); double sum = 100000; //????????????10?????? int ??? = 0; //?????????????????±??? ??? = Integer.parseInt(br.readLine()); for(int i = 0; i < ???; i++){ sum = sum * 1.05; sum = sum / 1000; sum = Math.ceil(sum) * 1000; } System.out.println(sum); } }
Main.java:10: error: not a statement int ??? = 0; //????????????????????? ^ Main.java:10: error: ';' expected int ??? = 0; //????????????????????? ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: : expected ??? = Integer.parseInt(br.readLine()); ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ 11 errors
s459354359
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int sum = 100000; //????????????10?????? int ??? = 0; //?????????????????±??? ??? = Integer.parseInt(br.readLine()); for(int i = 0; i < ???; i++){ sum *= 1.05; if(sum % 1000 != 0){ sum += 1000 - sum % 1000; } } System.out.println(sum); } }
Main.java:10: error: not a statement int ??? = 0; //????????????????????? ^ Main.java:10: error: ';' expected int ??? = 0; //????????????????????? ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: illegal start of expression ??? = Integer.parseInt(br.readLine()); ^ Main.java:12: error: : expected ??? = Integer.parseInt(br.readLine()); ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ Main.java:14: error: illegal start of expression for(int i = 0; i < ???; i++){ ^ 11 errors
s886741592
p00007
Java
import java.math.BigDecimal; import java.util.Scanner; public class DebtHell { public static void Main(String[] args) { @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); double money = 100000; int num = sc.nextInt(); for(int i = 0; i < num; i++) money *= 1.05; BigDecimal bd = new BigDecimal(money); BigDecimal thousand = new BigDecimal(1000); bd = bd.divide(thousand); BigDecimal result = bd.setScale(0, BigDecimal.ROUND_UP); result = result.multiply(thousand); System.out.println(result); } }
Main.java:4: error: class DebtHell is public, should be declared in a file named DebtHell.java public class DebtHell { ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s796307774
p00007
Java
package java_rensyu; import java.math.BigDecimal; import java.util.Scanner; public class Chika { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int week = scanner.nextInt(); BigDecimal debt = new BigDecimal(100000); BigDecimal rate = new BigDecimal(1.05); for (int i = 0; i < week; i++) { debt = debt.multiply(rate); BigDecimal amari = debt.remainder(new BigDecimal(1000)); if(amari !=new BigDecimal(0)){ debt = debt.add(new BigDecimal(1000)).subtract(amari); } } System.out.println(debt); scanner.close(); }
Main.java:31: error: reached end of file while parsing } ^ 1 error
s689121844
p00007
Java
import java.math.BigDecimal; import java.util.Scanner; public class Chika { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int week = scanner.nextInt(); BigDecimal debt = new BigDecimal(100000); BigDecimal rate = new BigDecimal(1.05); for (int i = 0; i < week; i++) { debt = debt.multiply(rate); BigDecimal amari = debt.remainder(new BigDecimal(1000)); if(amari !=new BigDecimal(0)){ debt = debt.add(new BigDecimal(1000)).subtract(amari); } } System.out.println(debt); scanner.close(); }
Main.java:29: error: reached end of file while parsing } ^ 1 error
s953550712
p00007
Java
import java.math.BigDecimal; import java.util.Scanner; public class Chika { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int week = scanner.nextInt(); BigDecimal debt = new BigDecimal(100000); BigDecimal rate = new BigDecimal(1.05); for (int i = 0; i < week; i++) { debt = debt.multiply(rate); BigDecimal amari = debt.remainder(new BigDecimal(1000)); if(amari !=new BigDecimal(0)){ debt = debt.add(new BigDecimal(1000)).subtract(amari); } } System.out.println(debt); scanner.close(); } }
Main.java:4: error: class Chika is public, should be declared in a file named Chika.java public class Chika { ^ 1 error
s705557373
p00007
Java
class Main{ public static void main(String[] args){ double debt = 100000; double mo = 0.05; int turm = new Scanner(System.in).nextInt(); while(turm>0){ debt = debt*1.05; debt = Math.ceil(debt/1000)*1000; turm--; } System.out.println((int)debt); } }
Main.java:6: error: cannot find symbol int turm = new Scanner(System.in).nextInt(); ^ symbol: class Scanner location: class Main 1 error
s915763701
p00007
Java
import java.io.*; class Main { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\???????????????????????? String line = br.readLine(); int deptWeek = Integer.parseInt(line); int dept = 100000; for(int i = 1; i < deptWeek; i++ ){ int checkDept = (int)Math.ceil(dept * 0.05); String strCheckDept = String.valueOf(checkDept); String num = strCheckDept.substring(strCheckDept.length() - 4, strCheckDept.length() - 3); if(!num.equals("0")){ int numnum = Integer.parseInt(num); checkDept = checkDept + 10000 - numnum; } dept = dept + checkDept; } System.out.println(dept); } catch (Exception e) { e.printStackTrace(); } }
Main.java:24: error: reached end of file while parsing } ^ 1 error
s916346994
p00007
Java
public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.nextLine()); double debt = 100000; while(n > 0){ debt *= 1.05; debt = 1000.0*Math.ceil(debt/1000.0); n--; } System.out.println(String.format("%.0f",debt)); }//main }//class
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s894234195
p00007
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int debt = 100000; while(n-- != 0) { debt += debt*0.05; int a = debt%1000; if(a != 0) debt += 1000-a; } System.out.println(debt); } } 5
Main.java:16: error: class, interface, enum, or record expected 5 ^ 1 error
s114607540
p00007
Java
import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*'&#1000;');}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}}
Main.java:1: error: unclosed character literal import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*'&#1000;');}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} ^ Main.java:1: error: illegal character: '#' import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*'&#1000;');}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} ^ Main.java:1: error: unclosed character literal import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*'&#1000;');}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} ^ Main.java:1: error: unnamed classes are a preview feature and are disabled by default. import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*'&#1000;');}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} ^ (use --enable-preview to enable unnamed classes) Main.java:1: error: class, interface, enum, or record expected import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*'&#1000;');}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} ^ 5 errors
s919908907
p00007
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class P0007 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try{ int week = Integer.parseInt(br.readLine()); System.out.println(calcAfterDebt(100000, week)); } catch(Exception e){ return; } finally{ try { br.close(); } catch (IOException e) { // TODO Auto-generated catch block return; } } } private static int calcAfterDebt(int base,int week) { int result = base; for(int i=0;i<week;i++){ result = (int) (result*1.05); if(result % 1000 > 0){ result = cutThousand(result) + 1000; } } return result; } private static int cutThousand(int money){ String str = Integer.toString(money); String str2 = str.substring(0, str.length() - 3); while(str2.length() < str.length()){ str2 += "0"; } return Integer.parseInt(str2); } }
Main.java:6: error: class P0007 is public, should be declared in a file named P0007.java public class P0007 { ^ 1 error
s750245989
p00007
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws java.io.IOException{ Scanner scan = new Scanner(System.in); int sum=100000; for(int n=scan.nextInt();n>0;n--){ sum +=5000; int m= up3(sum); sum+=(10-m)*100; } System.out.println(sum); } public static int up3(int n){ return n%1000; }
Main.java:21: error: reached end of file while parsing } ^ 1 error
s334121181
p00007
Java
import java.util.*; public class a0007 { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); long money = 100000; for(int i=1; i<=n; i++){ money = (long) (money*1.05); if(money % 1000 != 0) money = money - money%1000 +1000 ; } System.out.println(money); } }
Main.java:2: error: class a0007 is public, should be declared in a file named a0007.java public class a0007 { ^ 1 error
s414389347
p00007
Java
import java.util.Scanner; public class DebtHell { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner in = new Scanner(System.in); int week = in.nextInt(); int dept = 100000; for (int i = 0; i < week; i++) { // 利子の計算 dept = (int)(dept * 1.05); // 1,000円未満は切り上げ if (dept % 1000 != 0) { dept = (dept / 1000) * 1000; dept += 1000; } } System.out.println(dept); } }
Main.java:3: error: class DebtHell is public, should be declared in a file named DebtHell.java public class DebtHell { ^ 1 error
s118800160
p00007
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); int n = scn.nextInt(); int a = 100; for (int i = 0; i < n; i++) { a = Math.ceil(a * 1.05); } System.out.println(a * 1000); } }
Main.java:9: error: incompatible types: possible lossy conversion from double to int a = Math.ceil(a * 1.05); ^ 1 error