submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s267183940
p00444
C
#include <stdio.h> int main() { int n, cnt=0; while (1) { scanf("%d", &n); if (n == 0)break; do { n -= 500;cnt += 1; } while (n > 499); do { n -= 100;cnt += 1; } while (n > 99); do { n -= 10;cnt += 1; } while (n > 0); printf("%d", cnt); return 0; }
main.c: In function 'main': main.c:18:9: error: expected declaration or statement at end of input 18 | } | ^
s545460083
p00444
C
#include <stdio.h> int main() { int n, cnt=0; while (1) { scanf("%d", &n); if (n == 0)break; do { n -= 500;cnt += 1; } while (n > 499); if(n!=0) do { n -= 100;cnt += 1; } while (n > 99); if(n!=0) do { n -= 10;cnt += 1; } while (n > 0); printf("%d", cnt); return 0; }
main.c: In function 'main': main.c:20:9: error: expected declaration or statement at end of input 20 | } | ^
s591843086
p00444
C
#include <stdio.h> int main() { int n, cnt=0; while (1) { scanf("%d", &n); if (n == 0)break; while (n > 499) { n -= 500; cnt++; } while (n > 99) { n -= 100; cnt++; } while (n > 49) { n -= 50; cnt++; } while (n > 9) { n -= 10; cnt++; } while (n > 4) { n -= 5; cnt++...
main.c: In function 'main': main.c:37:9: error: expected declaration or statement at end of input 37 | } | ^
s941113872
p00444
C
#include <stdio.h> int main() { int n, cnt=0; while (1) { scanf("%d", &n); if (n == 0)break; n = 1000 - n; while (n > 499) { n -= 500; cnt++; } while (n > 99) { n -= 100; cnt++; } while (n > 49) { n -= 50; cnt++; } while (n > 9) { n -= 10; cnt++; } while (n > 4) { ...
main.c: In function 'main': main.c:39:9: error: expected declaration or statement at end of input 39 | } | ^
s025851431
p00444
C
#include <stdio.h> int main() { int n, cnt=0,a; while (1) { scanf("%d", &a); if (a == 0)break; n = 1000 - a; while (n > 499) { n -= 500; cnt+=1; } while (n > 99) { n -= 100; cnt+=1; } while (n > 49) { n -= 50; cnt+=1; } while (n > 9) { n -= 10; cnt+=1; } while (n >...
main.c: In function 'main': main.c:39:9: error: expected declaration or statement at end of input 39 | } | ^
s012999904
p00444
C
#include <stdio.h> int main() { int n, cnt=0,a; while (1) { scanf("%d", &a); if (a == 0)break; n = 1000 - a; while (n > 499) { n -= 500; cnt+=1; } while (n > 99) { n -= 100; cnt+=1; } while (n > 49) { n -= 50; cnt+=1; } while (n > 9) { n -= 10; cnt+=1; } while (n >...
main.c: In function 'main': main.c:39:9: error: expected declaration or statement at end of input 39 | } | ^
s204384117
p00444
C
include<stdio.h> int main(void){ int change; int buy; int count; while(1){ scanf("%d",&buy); if(buy==0) break; change=1000-buy; count=0; // printf("now_change: %d\n",change); while(change>=500){ change-=500; count++; // printf("now_change: %d\n",change); } whi...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s581397410
p00444
C
#include <stdio.h> main(){ int kingaku,kouka,k500,k100,k50,k10,k5; kouka=0; scanf("%d",&kingaku); kingaku/500=k500; kouka+=k500; kingaku-=k500; kingaku/100=k100; kouka+=k100; kingaku-=k100; kingaku/50=k50; kouka+=k50; kingaku-=k50; kingaku/10=k10; kouka+=k10; kingaku-=k10; ...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:6:15: error: lvalue required as left operand of assignment 6 | kingaku/500=k500; | ^ main.c:9:15: error: lvalue required as left operand of assignment 9 | k...
s607959526
p00444
C
#include <stdio.h> main(){ int kingaku,kouka,k500,k100,k50,k10,k5; kouka=0; scanf("%d",&kingaku); kingaku/500=k500; kouka+=k500; kingaku-=k500; kingaku/100=k100; kouka+=k100; kingaku-=k100; kingaku/50=k50; kouka+=k50; kingaku-=k50; kingaku/10=k10; kouka+=k10; kingaku-=k10; ...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:6:15: error: lvalue required as left operand of assignment 6 | kingaku/500=k500; | ^ main.c:9:15: error: lvalue required as left operand of assignment 9 | k...
s457614475
p00444
C
include <stdio.h> main(){ int kingaku,kouka,k500,k100,k50,k10,k5; kouka=0 ; scanf("%d",&kingaku); if(kingaku<0||kingaku>1000) input("error") else{ kingaku=1000-kingaku; k500=kingaku/500; kouka+=k500; kingaku-=k500*500; k100=kingaku/100; kouka+=k100; kingaku-=k100*100; k50...
main.c:2:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 2 | include <stdio.h> | ^
s999812852
p00444
C
#include <stdio.h> main(){ int kingaku,kouka; kouka=0 ; while(1){ scanf("%d",&kingaku); if(kingaku==0) break; kingaku=1000-kingaku; k500=kingaku/500; kouka+=k500; kingaku-=k500*500; k100=kingaku/100; kouka+=k100; kingaku-=k100*100; k50=kingaku/50; kouka+=k50; kingaku-=...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:12:4: error: 'k500' undeclared (first use in this function) 12 | k500=kingaku/500; | ^~~~ main.c:12:4: note: each undeclared identifier is reported only once for each function...
s930096451
p00444
C
#include <stdio.h> main(){ int kingaku,kouka; kouka=0 ; while(1){ scanf("%d",&kingaku); if(kingaku==0) break; else{ kingaku=1000-kingaku; k500=kingaku/500; kouka+=k500; kingaku-=k500*500; k100=kingaku/100; kouka+=k100; kingaku-=k100*100; k50=kingaku/50; kouka+=k50; k...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:12:4: error: 'k500' undeclared (first use in this function) 12 | k500=kingaku/500; | ^~~~ main.c:12:4: note: each undeclared identifier is reported only once for each function...
s542632326
p00444
C
#include <stdio.h> main(){ int kingaku,kouka; kouka=0 ; while(1){ scanf("%d",&kingaku); if(kingaku==0) break; else{ kingaku=1000-kingaku; k500=kingaku/500; kouka+=k500; kingaku-=k500*500; k100=kingaku/100; kouka+=k100; kingaku-=k100*100; k50=kingaku/50; kouka+=k50; k...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:12:4: error: 'k500' undeclared (first use in this function) 12 | k500=kingaku/500; | ^~~~ main.c:12:4: note: each undeclared identifier is reported only once for each function...
s358624851
p00444
C
#include <stdio.h> main(){ int kingaku,kouka,k500,k100,k50,k10,k5; while(1){ scanf("%d",&kingaku); kouka=0 if(kingaku==0) break; kingaku=1000-kingaku; k500=kingaku/500; kouka+=k500; kingaku-=k500*500; k100=kingaku/100; kouka+=k100; kingaku-=k100*100; k50=kingaku/50; kou...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:7:10: error: expected ';' before 'if' 7 | kouka=0 | ^ | ; 8 | 9 | if(kingaku==0) break; | ~~
s522298694
p00444
C
#include<stdio.h> int main(){ int i; int a; int c; int coin[] = {500,100,50,10,5,1} while(1){ scanf("%d ",&a); if(!a)break; c = 0; a = 1000-a; for(i=0;i<6;i++){ while(a>=coin[i]){ a -= coin[i]; c++; } } printf("%d\n",c); } return 0; }
main.c: In function 'main': main.c:9:3: error: expected ',' or ';' before 'while' 9 | while(1){ | ^~~~~
s864346028
p00444
C
void main(){ int n; int count = 0; int a[] ={500,100,50,10,5,1}; int i ; while(true){ scanf("%d",&n); if(!n){ break } count= 0; for(i = 0; i <6;i++){ while(n>a[i]){ n-=a[i]; count++; } } printf("%d\n",count); } }
main.c: In function 'main': main.c:6:7: error: 'true' undeclared (first use in this function) 6 | while(true){ | ^~~~ main.c:1:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' +++ |+#include <stdbool.h> 1 | void main(){ main.c:6:7: note:...
s208329138
p00444
C
#include<stdio.h> int main(void){ int money; int n; int i; n = 0; scanf("%d", &money); money = 1000 - money; if (money >= 500){ n += money / 500; money %= 500; } if (money >= 100 && money < 500){ n += money / 100; money %= 100; } if (money >= 50 && money < 100){ n += money...
main.c: In function 'main': main.c:30:12: error: expected ')' before 'h' 30 | if (money h>= 5 && money < 10){ | ~ ^~ | )
s047556139
p00444
C
#include <iostream> using namespace std; int main(){ int money; while(cin >> money && money !=0){ int count =0; int res = 1000 - money; for(int i=0;i<3;i++){ // cout << res << endl; count +=res %10; if(res % 10 >5) count -= 4; res /=10; } cout << count << endl; }...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s605951161
p00444
C
include <stdio.h> main() { int pay, charge, count=0, i; scanf("%d", &pay); charge = 1000 - pay; count += i = charge/500; charge = charge - i*500; count += i = charge/100; charge = charge - i*100; count += i = charge/50; charge = charge - i*50; count += i = charge/10; ...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s636856644
p00444
C
#include <iostream> using namespace std; int main(){ int n ,coin=0; while ( 1 ){ cin >> n; if( cin.eof() ){ break; } n = 1000 - n; if( n >= 500 ){ while( n >= 500 ){ n -= 500; coin++; } } if( n >= 100 ){ while( n >= 100 ){ n -= 100; coin++; ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s037145418
p00444
C
#include<stdio.h> int f(int n){ count=x/n; x=x%n; } int main(){ int x,count; scanf("%d",&x); x=1000-x; f(500); f(100); f(50); f(10); f(5); count+=x; printf("%d",count); }
main.c: In function 'f': main.c:3:1: error: 'count' undeclared (first use in this function) 3 | count=x/n; | ^~~~~ main.c:3:1: note: each undeclared identifier is reported only once for each function it appears in main.c:3:7: error: 'x' undeclared (first use in this function) 3 | count=x/n; | ...
s473206374
p00444
C
#include<stdio.h> int x,count; int f(int n){ count=x/n; x=x%n; } int main(){ count=0; scanf("%d",&x); x=1000-x; f(500); f(100); f(50); f(10); f(5); count+=x; printf("%d",count);
main.c: In function 'main': main.c:17:1: error: expected declaration or statement at end of input 17 | printf("%d",count); | ^~~~~~
s046607392
p00444
C++
#include<iostream> using namespace std; int main(){ int n; while(cin >> n, n){ n = 1000 - n int ans = n/500+n%500/100+ n%100/50+n%50/10 n%10/5+ n%5 cout << ans << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: expected ';' before 'int' 7 | n = 1000 - n | ^ | ; 8 | int ans = n/500+n%500/100+ | ~~~
s465365886
p00444
C++
#include<iostream> using namespace std; int main(){ int n; while(cin >> n, n){ n = 1000 - n; int ans = n/500+n%500/100+ n%100/50+n%50/10 n%10/5+ n%5 cout << ans << endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:13: error: expected ',' or ';' before 'n' 10 | n%10/5+ n%5 | ^
s082980669
p00444
C++
#include <bits/stdc++.h> using namespace std; #define TEMP_T template<typename T> TEMP_T void sort(T& v){ sort(v.begin(), v.end()); } TEMP_T void revs(T& v){ reverse(v.begin(), v.end()); } TEMP_T void uniq(T& v){ sort(v); v.erase(unique(v.begin(), v.end())); } TEMP_T T cums(T& v){ T r(v.size()); partial_sum(v.begi...
a.cc: In member function 'int Solver::solve()': a.cc:19:3: warning: no return statement in function returning non-void [-Wreturn-type] 19 | } | ^ a.cc: In function 'int main()': a.cc:30:9: error: assignment of read-only variable 'c' 30 | c += n / c[i]; | ~~^~~~~~~~~~~
s739809006
p00444
C++
#include<stdio.h> int main(void){ int amount,coins+=0; scanf("%d",&amount); amount=1000-amount; coins+=amount/500; coins+=(amount%500)/100; coins+=(amount%100)/50; coins+=(amount%50)/10; coins+=(amount%10)/5; coins+=amount%5; printf("%d\n",coins); return 0; }
a.cc: In function 'int main()': a.cc:3:25: error: expected initializer before '+=' token 3 | int amount,coins+=0; | ^~ a.cc:6:9: error: 'coins' was not declared in this scope 6 | coins+=amount/500; | ^~~~~
s897174610
p00444
C++
#include <iostream> using namespace std; int main(){ int a,b,c,d1,e,f,g,h; int sum=0; while(cin>>a){ if(a==0)break; b=1000-a; c=b/500; d=(b-500*c)/100; e=(b-500*c-100*d)/50; f=(b-500*c-100*d-50*e)/10; g=(b-500*c-100*d-50*e-10*f)/5; h=b-500*c-100*d-50*e-10*f-5*g; cout<<c+d+e+f+g+h<<endl; } return...
a.cc: In function 'int main()': a.cc:11:17: error: 'd' was not declared in this scope 11 | d=(b-500*c)/100; | ^
s537516336
p00444
C++
#include<iostream> using namespace std; int main(){ while(true){ int iwakurasisetudan; int b; int c; cin>>iwakurasisetudan; if(iwakurasisetudan==0){break; }else{ c=1000-a; b=c/500; c=c%500; b=b+c/100; c=c%100; b=b+c/50; c=c%50; b=b+c/10; c=c%10; b=b+c/5; c=c%5; b=b+c; cout<<b<<endl; }}...
a.cc: In function 'int main()': a.cc:11:16: error: 'a' was not declared in this scope 11 | }else{ c=1000-a; | ^
s926721768
p00444
C++
#include <stdio.h> int change(int); int main(void) { int money, mai; scanf("%d", &money); while(money != 0) { money = 1000 - money; mai = change(money); scanf("%d", &money); } printf("%d\n", mai); return 0; } int change (kane){ int count = 0, i = 0; int wei[6] = {500, 100, 50, 10, 5, 1}; ...
a.cc:15:17: error: 'int change' redeclared as different kind of entity 15 | int change (kane){ | ^ a.cc:2:5: note: previous declaration 'int change(int)' 2 | int change(int); | ^~~~~~ a.cc:15:13: error: 'kane' was not declared in this scope 15 | int change (kane){ | ...
s762244199
p00444
C++
main(){ int money = 1000;int buy = 0;int maisuu = 0; cin >> buy; money = money - buy if(money >= 500){ maisuu = maisuu + 1; money = money - 500 ; } if(money >= 100){ maisuu = maisuu + money/100; money =money % 100; } if(money >= 50){ maisuu = maisuu + 1; money = money - 50 ; } if(money >= 100){ maisuu...
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:3:1: error: 'cin' was not declared in this scope 3 | cin >> buy; | ^~~ a.cc:4:20: error: expected ';' before 'if' 4 | money = money - buy | ...
s003301706
p00444
C++
main(){ int money = 1000;int buy = 0;int maisuu = 0; cin >> buy; money = money - buy; if(money >= 500){ maisuu = maisuu + 1; money = money - 500 ; } if(money >= 100){ maisuu = maisuu + money/100; money =money % 100; } if(money >= 50){ maisuu = maisuu + 1; money = money - 50 ; } if(money >= 100){ maisu...
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:3:1: error: 'cin' was not declared in this scope 3 | cin >> buy; | ^~~ a.cc:21:20: error: expected ';' before 'if' 21 | money = money - buy | ...
s254044285
p00444
C++
#include <iostream> main(){ int money = 1000;int buy = 0;int maisuu = 0; cin >> buy; money = money - buy; if(money >= 500){ maisuu = maisuu + 1; money = money - 500 ; } if(money >= 100){ maisuu = maisuu + money/100; money =money % 100; } if(money >= 50){ maisuu = maisuu + 1; money = money - 50 ; } if(mo...
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin >> buy; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c...
s910618528
p00444
C++
#include <iostream> using namespace std; main(){ int money = 1000;int buy = 0;int maisuu = 0; cin >> buy; money = money - buy; if(money >= 500){ maisuu = maisuu + 1; money = money - 500 ; } if(money >= 100){ maisuu = maisuu + money/100; money =money % 100; } if(money >= 50){ maisuu = maisuu + 1; money = ...
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:23:20: error: expected ';' before 'if' 23 | money = money - buy | ^ | ; 24 | if(money >= 5){ | ~~ ...
s797400722
p00444
C++
#include<iostream> #include<string> #include<vector> #define CI cin >> #define CO cout << #define E << endl; using namespace std; int main(void) { int temp = 0; int cost_input[10]; int cost_return = 0; int num = 0; int j = 0; for (int i = 0; i < 10; ++i) { CI temp; if (temp == 0) { j = i; break; }...
a.cc: In function 'int main()': a.cc:62:27: error: 'num_answer' was not declared in this scope 62 | ++num_answer; | ^~~~~~~~~~ a.cc:67:35: error: 'num_answer' was not declared in this scope 67 | ++num_answer; | ...
s346780825
p00444
C++
#include <iostream> #include <string> #include <algorithm> #include <stack> #include <queue> #include <set> using namespace std; int main() { int a = 0; int b; int c = 0; for (; a != 0;) { cin >> a; b = a; for (; b != 0;) { if (b >= 500) { b = b - 500; c++; } if (b >= 100) { b = ...
a.cc: In function 'int main()': a.cc:49:38: error: expected ';' before '}' token 49 | cout<<c<<endl | ^ | ; 50 | } | ~
s055531449
p00444
C++
#include <iostream> using namespace std; int main() { int all, rem, count = 0, tmp; while (1) { cin >> all; if (all == 0) break; rem = 1000 - all; if (rem >= 500) { count = count + 1; rem = rem - 500; } if (rem >= 100) { tmp = rem / 100; count = count + tmp; rem = rem - (100 * tmp); }...
a.cc: In function 'int main()': a.cc:39:18: error: expected '}' at end of input 39 | return 0; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s052447221
p00444
C++
#include<iostream> using namespace std; int main(){ int total; int change; int count=0; while(true){ cin>>total; if(total==0){ break; } change=1000-total; while(true){ if(change>=500){ change-=500; count++; }else if(change>=100){ change-=100; count++; }else if(change>=50){ ...
a.cc: In function 'int main()': a.cc:35:14: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<' 35 | count<<count<<"\n"; | ~~~~~~~~~~~~^~~~~~ | | | | int const char [2]
s358044960
p00444
C++
#include<iostream> using namespace std; int main(){ int m,t; int p=0; cin >> m; if(m==0){ break; } t=1000-m; while(1){ if(t>=500){ t-=500; p++; }else if(t>=100){ t-=100; p++; }else if(t>=50){ t-=50; p++; }else if(t>=10){ t-=10; p++; }else if(t>=5){ t-=5; p++; }else{ t--; p++; } if(t==0){...
a.cc: In function 'int main()': a.cc:9:17: error: break statement not within loop or switch 9 | break; | ^~~~~ a.cc:37:9: error: 'count' was not declared in this scope 37 | count=0; | ^~~~~
s575353094
p00444
C++
#include<iostream> using namespace std; int main(){ int buy,oturi,kouka; while(1){ cin>>buy; if(buy==0){ break; } oturi=1000-buy; if(oturi>500){ oturi-=500; kouka+=1; } while(oturi>=100){ oturi-=100; kouka+=1; } while(oturi>=50){ oturi-=50; kouka+=1; } while(oturi>=10){ oturi-=10; kouka+=1; } while(oturi>=5){ oturi-=5...
a.cc:39:1: error: expected unqualified-id before 'return' 39 | return 0; | ^~~~~~ a.cc:40:1: error: expected declaration before '}' token 40 | } | ^
s382955762
p00444
C++
#include<iostream> using namespace std; int main(){ int n;while(true){cin>>n;if(n==0){break;} cout<<n/500+(n/100)%5+(n/50)%2+(n/10)%5+(n/5)%2+n%5<<endl;}
a.cc: In function 'int main()': a.cc:5:60: error: expected '}' at end of input 5 | cout<<n/500+(n/100)%5+(n/50)%2+(n/10)%5+(n/5)%2+n%5<<endl;} | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s430545282
p00444
C++
#include <iostream> using namespace std; int main () { int m1; while(1) { cin>>m1; if(m1>0||m1<1000) { break; } else { int m2,m3,m4,m5,m6,m7; } m2=1000-m1; m3=m2/500; m4=m2%500/100; m5=m2%500%100/50; m6=m2%500%100%50/10; m7=m2%500%100%50%10/1; } retur...
a.cc: In function 'int main()': a.cc:19:4: error: 'm2' was not declared in this scope; did you mean 'm1'? 19 | m2=1000-m1; | ^~ | m1 a.cc:20:4: error: 'm3' was not declared in this scope; did you mean 'm1'? 20 | m3=m2/500; | ^~ | m1 a.cc:21:4: error: 'm4' was not declared...
s461482036
p00444
C++
#include <iostream> using namespace std; int main () { int m1; while(1) { cin>>m1; if(m1>0||m1<=1000) { break; } else { int m2,m3,m4,m5,m6,m7; } m2=1000-m1; m3=m2/500; m4=m2%500/100; m5=m2%500%100/50; m6=m2%500%100%50/10; m7=m2%500%100%50%10/1; cout<<...
a.cc: In function 'int main()': a.cc:19:4: error: 'm2' was not declared in this scope; did you mean 'm1'? 19 | m2=1000-m1; | ^~ | m1 a.cc:20:4: error: 'm3' was not declared in this scope; did you mean 'm1'? 20 | m3=m2/500; | ^~ | m1 a.cc:21:4: error: 'm4' was not declared...
s879984750
p00444
C++
#include <iostream> using namespace std; int main () { int m1; while(1) { cin>>m1; if(m1>0||m1<=1000) { break; } else { int m2,m3,m4,m5,m6,m7; } m2=1000-m1; m3=m2/500; m4=m2%500/100; m5=m2%500%100/50; m6=m2%500%100%50/10; m7=m2%500%100%50%10/1; cout<<...
a.cc: In function 'int main()': a.cc:19:4: error: 'm2' was not declared in this scope; did you mean 'm1'? 19 | m2=1000-m1; | ^~ | m1 a.cc:20:4: error: 'm3' was not declared in this scope; did you mean 'm1'? 20 | m3=m2/500; | ^~ | m1 a.cc:21:4: error: 'm4' was not declared...
s565073700
p00444
C++
#include<iostream> using namespace std; int main(){ int siharai,oturi=1; int a,b,c,d,e,f; while(oturi!=0){ cin>>siharai; oturi=1000-siharai; if(oturi>=500){ a=1; oturi=oturi-500; } else{ a=0; } while(oturi>=100){ if(oturi>=100){ b=1; oturi=oturi-100; } else a=0; } while(oturi>=50){ if(oturi>=50){ c=1; oturi=oturi-5...
a.cc: In function 'int main()': a.cc:65:10: error: expected '}' at end of input 65 | return 0; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s607017452
p00444
C++
#include<iostream> using namespace std; int main(){ int price,cnt=0,div[6]=[500,100,50,10,5,1]; while(1){ cin>>price; if(price==0)break; price=1000-price; for(i=0;i<6;i++){ if((price/div[i])!=0){ cnt+=(price/div[i]); price-=(price/div[i])*div[i]; } } cout<<cnt<<endl; cnt=0; } return 0; }
a.cc: In function 'int main()': a.cc:4:25: error: expected identifier before numeric constant 4 | int price,cnt=0,div[6]=[500,100,50,10,5,1]; | ^~~ a.cc:4:28: error: expected ']' before ',' token 4 | int price,cnt=0,div[6]=[500,100,50,10,5,1]; | ^ ...
s391601847
p00444
C++
#include<iostream> using namespace std; int main(){ int price,cnt=0,div[6]=[500,100,50,10,5,1]i; while(1){ cin>>price; if(price==0)break; price=1000-price; for(i=0;i<6;i++){ if((price/div[i])!=0){ cnt+=(price/div[i]); price-=(price/div[i])*div[i]; } } cout<<cnt<<endl; cnt=0; } return 0; }
a.cc: In function 'int main()': a.cc:4:25: error: expected identifier before numeric constant 4 | int price,cnt=0,div[6]=[500,100,50,10,5,1]i; | ^~~ a.cc:4:28: error: expected ']' before ',' token 4 | int price,cnt=0,div[6]=[500,100,50,10,5,1]i; | ^...
s263341840
p00444
C++
#include<iostream> using namespace std; int main(){ int price,cnt=0,div[6]=[500,100,50,10,5,1],i; while(1){ cin>>price; if(price==0)break; price=1000-price; for(i=0;i<6;i++){ if((price/div[i])!=0){ cnt+=(price/div[i]); price-=(price/div[i])*div[i]; } } cout<<cnt<<endl; cnt=0; } return 0; }
a.cc: In function 'int main()': a.cc:4:25: error: expected identifier before numeric constant 4 | int price,cnt=0,div[6]=[500,100,50,10,5,1],i; | ^~~ a.cc:4:28: error: expected ']' before ',' token 4 | int price,cnt=0,div[6]=[500,100,50,10,5,1],i; | ...
s864916719
p00444
C++
#include<iostream> using namespace std; int main(){ int price,cnt=0; int div[6]=[500,100,50,10,5,1]; int i; while(1){ cin>>price; if(price==0)break; price=1000-price; for(i=0;i<6;i++){ if((price/div[i])!=0){ cnt+=(price/div[i]); price-=(price/div[i])*div[i]; } } cout<<cnt<<endl; cnt=0; } return 0; }
a.cc: In function 'int main()': a.cc:5:13: error: expected identifier before numeric constant 5 | int div[6]=[500,100,50,10,5,1]; | ^~~ a.cc:5:16: error: expected ']' before ',' token 5 | int div[6]=[500,100,50,10,5,1]; | ^ | ] a.cc: In lambda function...
s715658534
p00444
C++
#include <cstdio> using namespace std; int main() {while(1){ int a; scanf("%d",&a); if(a==0) return 0; a=1000-a; printf("%d\n",a/500a+(a/100)%5+(a/50)%2+(a/10)%5+(a/5)%2+a%5;} }
a.cc: In function 'int main()': a.cc:9:18: error: unable to find numeric literal operator 'operator""a' 9 | printf("%d\n",a/500a+(a/100)%5+(a/50)%2+(a/10)%5+(a/5)%2+a%5;} | ^~~~
s176692151
p00444
C++
#include <cstdio> using namespace std; int main() {while(1){ int a; scanf("%d",&a); if(a==0) return 0; a=1000-a; printf("%d\n",a/500a+(a/100)%5+(a/50)%2+(a/10)%5+(a/5)%2+a%5);} }
a.cc: In function 'int main()': a.cc:9:18: error: unable to find numeric literal operator 'operator""a' 9 | printf("%d\n",a/500a+(a/100)%5+(a/50)%2+(a/10)%5+(a/5)%2+a%5);} | ^~~~
s577952574
p00444
C++
#include<iostream> using namespace std; int main() { int money,count,maisu = 0,oturi[1000] = {}; int money2[6] = {500,100,50,10,5,1}; for(int i = 0;i >= 0;i++){ cin >> money; count++; if(money == 0) break; oturi[] = 1000 - money; } for(int j = 0;j < count;j++){ for(int i = 0;i < 6...
a.cc: In function 'int main()': a.cc:13:11: error: expected primary-expression before ']' token 13 | oturi[] = 1000 - money; | ^
s187656199
p00444
C++
#include <stdio.h> int main(){ int okane; int oturi; int count = 0; int a[] = { 1, 5, 10, 50, 100, 500 }; scanf_s("%d", &okane); oturi = 1000 - okane; for (int i = 5; i >= 0; i--){ if (okane >= a[i]){ okane = okane - a[i]; count = count + 1; } } printf("%d\n",count); return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d", &okane); | ^~~~~~~ | scanf
s496463388
p00444
C++
#include <stdio.h> void main(){ int okane; int oturi; int count = 0; int a[] = { 1, 5, 10, 50, 100, 500 }; scanf_s("%d", &okane); oturi = 1000 - okane; for (int i = 5; i >= 0; i--){ if (okane >= a[i]){ okane = okane - a[i]; count = count + 1; } } printf("%d\n",count); }
a.cc:3:1: error: '::main' must return 'int' 3 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d", &okane); | ^~~~~~~ | scanf
s337369834
p00444
C++
#include <stdio.h> void main(){ int okane; int oturi; int count = 0; int a[] = { 1, 5, 10, 50, 100, 500 }; scanf("%d", &okane); oturi = 1000 - okane; for (int i = 5; i >= 0; i--){ if (okane >= a[i]){ okane = okane - a[i]; count = count + 1; } } printf("%d\n",count); }
a.cc:3:1: error: '::main' must return 'int' 3 | void main(){ | ^~~~
s358287985
p00444
C++
#include <stdio.h> void main(){ int okane; int oturi; int count = 0; int a[] = { 1, 5, 10, 50, 100, 500 }; scanf("%d", &okane); oturi = 1000 - okane; for (int i = 5; i >= 0; i--){ if (okane >= a[i]){ okane = okane - a[i]; count = count + 1; } } printf("%d\n",count); }
a.cc:3:1: error: '::main' must return 'int' 3 | void main(){ | ^~~~
s850924947
p00444
C++
#include <stdio.h> #include <stdlib.h> int main(){ int okane; int oturi; int count = 0; int a[] = { 1, 5, 10, 50, 100, 500 }; scanf_s("%d", &okane); oturi = 1000 - okane; for (int i = 5; i >= 0; i--){ if (oturi >= a[i]){ div_t d; d = div(oturi, a[i]); oturi = oturi - a[i] * d.quot; count = coun...
a.cc: In function 'int main()': a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | scanf_s("%d", &okane); | ^~~~~~~ | scanf
s861225422
p00444
C++
#include <stdio.h> #include <stdlib.h> int main(){ int okane; int oturi; int count = 0; int a[] = { 1, 5, 10, 50, 100, 500 }; scanf_s("%d", &okane); oturi = 1000 - okane; for (int i = 5; i >= 0; i--){ if (oturi >= a[i]){ div_t d; d = div(oturi, a[i]); oturi = oturi - a[i] * d.quot; count = coun...
a.cc: In function 'int main()': a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | scanf_s("%d", &okane); | ^~~~~~~ | scanf
s293704247
p00444
C++
Beta paiza.IO ??°???????????? ?????§ ??????????????? ??\??¬??? ???????????¢?????? ?????°?????? ??? C++ Split Button! Main.cpp ??? + Success  23 24 25 26 27 28 29 30 ...
a.cc:20:4: error: extended character ° is not valid in an identifier 20 | ??°???????????? | ^ a.cc:23:6: error: extended character § is not valid in an identifier 23 | ?????§ | ^ a.cc:29:4: error: stray '\' in program 29 | ??\??¬??? | ^ a.cc:29:7: error: extended character ¬ is n...
s218560763
p00444
C++
Beta paiza.IO ??°???????????? ?????§ ??????????????? ??\??¬??? ???????????¢?????? ?????°?????? ??? C++ Split Button! Main.cpp ??? + Success  23 24 25 26 27 28 29 30 ...
a.cc:20:4: error: extended character ° is not valid in an identifier 20 | ??°???????????? | ^ a.cc:23:6: error: extended character § is not valid in an identifier 23 | ?????§ | ^ a.cc:29:4: error: stray '\' in program 29 | ??\??¬??? | ^ a.cc:29:7: error: extended character ¬ is n...
s003735640
p00444
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n,n){ p=1000,s=0; p-=n; s+=p/500; p%=500; s+=p/100; p%=100; s+=p/50; p%=50; s+=p/10; p%=10; s+=p/5; p%=5; s+=p/1; p%=1; cout<<s<<endl;} }
a.cc: In function 'int main()': a.cc:6:1: error: 'p' was not declared in this scope 6 | p=1000,s=0; | ^ a.cc:6:8: error: 's' was not declared in this scope 6 | p=1000,s=0; | ^
s277595295
p00444
C++
???#include <bits/stdc++.h> #define MP make_pair #define PB push_back #define ALL(x) (x).begin(),(x).end() #define RALL(x) (x).rbegin(),(x).rend() #define RANGEBOX(x,y,maxX,maxY) (0 <= (x) && 0 <= (y) && (x) < (maxX) && (y) < (maxY)) #define RANGE(x, l, r) ((l) <= (x) && (x) <= (r)) #define rep(i, N) for (int i = 0;...
a.cc:1:4: error: stray '#' in program 1 | ???#include <bits/stdc++.h> | ^ a.cc:1:1: error: expected unqualified-id before '?' token 1 | ???#include <bits/stdc++.h> | ^ a.cc:19:9: error: 'vector' does not name a type 19 | typedef vector<int> VI; | ^~~~~~ a.cc:20:9: error: 'vector'...
s343124555
p00444
C++
// ???#include <bits/stdc++.h> #include <iostream> // #define MP make_pair // #define PB push_back // #define ALL(x) (x).begin(),(x).end() // #define RALL(x) (x).rbegin(),(x).rend() // #define RANGEBOX(x,y,maxX,maxY) (0 <= (x) && 0 <= (y) && (x) < (maxX) && (y) < (maxY)) // #define RANGE(x, l, r) ((l) <= (x) && (x) <...
a.cc:27:7: error: 'LL' does not name a type 27 | const LL INFL = 0x3f3f3f3f3f3f3f3fLL; | ^~
s196844398
p00444
C++
// ???#include <bits/stdc++.h> #include <iostream> // #define MP make_pair // #define PB push_back // #define ALL(x) (x).begin(),(x).end() // #define RALL(x) (x).rbegin(),(x).rend() // #define RANGEBOX(x,y,maxX,maxY) (0 <= (x) && 0 <= (y) && (x) < (maxX) && (y) < (maxY)) // #define RANGE(x, l, r) ((l) <= (x) && (x) <...
a.cc:27:7: error: 'LL' does not name a type 27 | const LL INFL = 0x3f3f3f3f3f3f3f3fLL; | ^~
s035523353
p00444
C++
// ???#include <bits/stdc++.h> #include <iostream> // #define MP make_pair // #define PB push_back // #define ALL(x) (x).begin(),(x).end() // #define RALL(x) (x).rbegin(),(x).rend() // #define RANGEBOX(x,y,maxX,maxY) (0 <= (x) && 0 <= (y) && (x) < (maxX) && (y) < (maxY)) // #define RANGE(x, l, r) ((l) <= (x) && (x) <...
a.cc:27:7: error: 'LL' does not name a type 27 | const LL INFL = 0x3f3f3f3f3f3f3f3fLL; | ^~
s705860000
p00444
C++
#include <iostream> #include <cstdio> using namespace std; #define print(a) printf("%d\n", a) #define FOR(i,a,b) for (int i = (a); i < (b); i++) #define REP(i,n) FOR(i,0,n) #define MAX(a,b) ((a)>(b)?(a):(b)) int main(){ int co, mod, ch = 0; while (cin >> co != EOF){ mod = 1000 - co; ch += mod/500; ...
a.cc: In function 'int main()': a.cc:17:26: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 17 | while (cin >> co != EOF){ | ~~~~~~~~~ ^~ | | | std...
s636657725
p00444
C++
#include <iostream> using namespace std; int main() { ios::sync_with_std(false); int n[5], count=0; for (int i=0; i<5; i++) cin >> n[i]; for (int i=0;i<5;i++) { if(n[i] == 0) break; int s=1000 - n[i]; int j = (s - s % 500)/500; count += j; s -= j*500; j = (s - s % 100)/100; ...
a.cc: In function 'int main()': a.cc:6:10: error: 'sync_with_std' is not a member of 'std::ios' {aka 'std::basic_ios<char>'} 6 | ios::sync_with_std(false); | ^~~~~~~~~~~~~
s060749374
p00444
C++
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); int n[5], count=0, coin = { 500,100,50,10,5 }; for (int i=0; i<5; i++) cin >> n[i]; for (int i=0;i<5;i++) { if(n[i] == 0) break; int s=1000 - n[i]; for (int j=0;j<5;j++) { int m = s / coin[j]; count += m;...
a.cc: In function 'int main()': a.cc:7:24: error: scalar object 'coin' requires one element in initializer 7 | int n[5], count=0, coin = { 500,100,50,10,5 }; | ^~~~
s289144615
p00444
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ int coin=0; int price=0; int flag=0; cin>>price; price=1000-price; while(1){ if(flag==1){ break; } if(price>=500){ price=price-500; coin=coin+1; } else if(price>=100){ price=price-100; coin=coin+1; } else if(price>=...
a.cc: In function 'int main()': a.cc:42:12: error: 'coins' was not declared in this scope; did you mean 'coin'? 42 | if(coins!=0){ | ^~~~~ | coin
s355249529
p00444
C++
#include<bits/stdc++.h> using namespace std; const int V[6]={1,5,10,50,100,500}; int C[6],A; void main(){ int ans=0; for(int i=5;i>=0;i--){ int t=min(A/V[i],C[i]); A-=t*V[i]; ans+=t; } printf("%d\n",ans); }
a.cc:6:1: error: '::main' must return 'int' 6 | void main(){ | ^~~~
s913846623
p00444
C++
#include<bits/stdc++.h> using namespace std; const int V[6]={1,5,10,50,100,500}; int C[6],A; void main(){ int ans=0; for(int i=5;i>=0;i--){ int t=min(A/V[i],C[i]); A-=t*V[i]; ans+=t; } printf("%d\n",ans); return 0; }
a.cc:6:1: error: '::main' must return 'int' 6 | void main(){ | ^~~~
s429924475
p00444
C++
#include<iostream> #include<string> using namespace std; int main(){ /* //数あて int n; cin >> n; int p[200][3]; #include<iostream> #include<string> using namespace std; int main(){ /* //数あて int n; cin >> n; int p[200][3]; for(int i=0;i<n;i++) { cin >> p[i][0] >> p[i][1] >> p[i][2]; } int _p; for(in...
a.cc:109:9: error: expected unqualified-id before 'for' 109 | for(int i=0;i<n;i++) | ^~~ a.cc:109:21: error: 'i' does not name a type 109 | for(int i=0;i<n;i++) | ^ a.cc:109:25: error: 'i' does not name a type 109 | for(int i=0;i<n;i++) | ...
s092270966
p00444
C++
#include<iostream> using namespace std; int main(){ while(1){ int n; cin>>n; if(n==0)break; int a,b,c,d,e,f,g; g=1000-n; for(a=0;a<2;a++){ for(b=0;b<5;b++){ for(c=0;c<2;c++){ for(d=0;d<5;d++){ for(e=0;e<2;e++){ for(f=0;f<5;f++){ if(a*500+b*100+c*50+d*10+e*5+f==g){ cout<<a+b+c+d...
a.cc: In function 'int main()': a.cc:27:8: error: expected '}' at end of input 27 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s675250277
p00444
C++
#include<iostream> using namespase std; int main( int n,m; cin >> n; n = 1000 - n; m = 0; if ( n >= 500) { m = m + 1; } if ( n >= 100) { m = m + (n / 100); } if (n >= 50) { m = m + (n / 50); } if (n >= 10) { m = m + (n / 10); } if (n >= 5) { m = m + (n / 5); } if (n >= 1) { m = m + (n / 1)...
a.cc:2:7: error: expected nested-name-specifier before 'namespase' 2 | using namespase std; | ^~~~~~~~~ a.cc:5:15: error: 'm' has not been declared 5 | int n,m; | ^ a.cc:5:16: error: expected ')' before ';' token 5 | int n,m; | ^ | ...
s652629308
p00444
C++
#include<iostream> #using namespase std; int main( int n,m; cin >> n; n = 1000 - n; m = 0; if ( n >= 500) { m = m + 1; } if ( n >= 100) { m = m + (n / 100); } if (n >= 50) { m = m + (n / 50); } if (n >= 10) { m = m + (n / 10); } i...
a.cc:2:2: error: invalid preprocessing directive #using 2 | #using namespase std; | ^~~~~ a.cc:5:11: error: 'm' has not been declared 5 | int n,m; | ^ a.cc:5:12: error: expected ')' before ';' token 5 | int n,m; | ^ | ) a.cc:4:9: note: to matc...
s807764623
p00444
C++
#include<iostream> using namespace std; int main( int n,m; cin >> n; n = 1000 - n; m = 0; if ( n >= 500) { m = m + 1; } if ( n >= 100) { m = m + (n / 100); } if (n >= 50) { m = m + (n / 50); } if (n >= 10) { m = m + (n / 10); } ...
a.cc:5:11: error: 'm' has not been declared 5 | int n,m; | ^ a.cc:5:12: error: expected ')' before ';' token 5 | int n,m; | ^ | ) a.cc:4:9: note: to match this '(' 4 | int main( | ^ a.cc:4:5: warning: second argument of 'int main(int, i...
s873497156
p00444
C++
#include<iostream> #include<string> using namespace std; int main(){ /* //数あて int n; cin >> n; int p[200][3]; for(int i=0;i<n;i++) { cin >> p[i][0] >> p[i][1] >> p[i][2]; } int _p; for(int k=0;k<3;k++) { for(int i=0;i<n;i++) { _p = p[i][k]; for(int j=i+1;j<n;j++) { if(_p == p[j][k]) ...
a.cc: In function 'int main()': a.cc:95:17: error: invalid types 'int[int]' for array subscript 95 | cout << onum[0] << endl; | ^
s128085877
p00444
C++
#include <iostream> using namespace std; int main(){ int n,m; cin >> n; m = 0; while( n <= 500 ){ n = n-500; m++; } while( n <= 100 ){ n = n-100; m++; } while( n <= 50 ){ n = n-50; m++; } while( n <= 10 ){ n = n-10; m++; } while( n <= 5 ){ n = n-5; m++; } while( n <= 1){ n = n-1; ...
a.cc: In function 'int main()': a.cc:33:19: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'}) 33 | cout << m <<cout; | ~~~~~~~~~ ^~~~~~ | | | | | basic_ostream<[...]...
s005917455
p00444
C++
#include<iostream> using namespace std; int coin[]={500,100,50,10,5,1}; int main() {int n,r,i;while(1){cin>>n;if(!n)break;n=1000-n,r=0;for(i=0;i<6;i++)r+=n/coin[i],n%=coin[i];cout<<res<<endl;}}
a.cc: In function 'int main()': a.cc:4:110: error: 'res' was not declared in this scope 4 | int main() {int n,r,i;while(1){cin>>n;if(!n)break;n=1000-n,r=0;for(i=0;i<6;i++)r+=n/coin[i],n%=coin[i];cout<<res<<endl;}} | ...
s026339786
p00444
C++
#import<cstdio> int main(){ int i,n,c[]={0,1,5,10,50,100,500}; for(;*c=0,scanf("%d",&n),n;printf("%d\n",*c)){ for(n=1000-n,i=6;i;i--){ for(;n>=c[i];){ n-=c[i],*c++; } } } }
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc: In function 'int main()': a.cc:7:42: error: lvalue required as increment operand 7 | n-=c[i],*c++; | ^
s002766987
p00444
C++
#include <iostream> using namespace std; int main() { int value,change; int coins; while(1) { cin >> value; if(value==0) break; coins=0; change=1000-value; coins+=change/500; change%=500; coins+=change/100; change%=100; coins+=change/50; change%=50; coins+=c...
a.cc:38:13: error: extended character   is not valid in an identifier 38 | cout << coinsツ << endl; | ^ a.cc: In function 'int main()': a.cc:38:13: error: 'coins\U000030c4\U00003000' was not declared in this scope 38 | cout << coinsツ << endl; | ^~~~~~~~~
s113393741
p00444
C++
g#include <iostream> using namespace std; int main() { int n; while (cin >> n) { if (n == 0) break; int change = 1000 - n; int count = 0; if (change >= 500) { change -= 500; count++; } if (change >= 100) { int coin_100 = chan...
a.cc:1:2: error: stray '#' in program 1 | g#include <iostream> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <iostream> | ^ a.cc: In function 'int main()': a.cc:7:12: error: 'cin' was not declared in this scope 7 | while (cin >> n) { | ^~~ a.cc:34:9: error: 'c...
s412598644
p00444
C++
#include <iostream> #include <string> using namespace std; int main(){ int a; int b; int c; while(cin >> a){ if(n!=0){b=1000-a; c=0; if(b=>500){b=b-500; c=c+1;} if(b=>100){while(b<100){b=b-100; c=c+1;}} if(b=>50){b=b-50; c=c+1;} if(b=>10){while(b<10){b=b-10; c=c+1;}} if(b=>5){b=b-5; c=c+1;} c=b+c; cout << c<<endl; } } ...
a.cc: In function 'int main()': a.cc:9:4: error: 'n' was not declared in this scope 9 | if(n!=0){b=1000-a; | ^ a.cc:11:6: error: expected primary-expression before '>' token 11 | if(b=>500){b=b-500; c=c+1;} | ^ a.cc:12:6: error: expected primary-expression before '>' token 12 | if(b=>100){...
s846128315
p00444
C++
#include <iostream> #include <string> using namespace std; int main(){ int a; int b; int c; while(cin >> a){ if(n!=0){b=1000-a; c=0; if(b>=500){b=b-500; c=c+1;} if(b>=100){while(b<100){b=b-100; c=c+1;}} if(b>=50){b=b-50; c=c+1;} if(b>=10){while(b<10){b=b-10; c=c+1;}} if(b>=5){b=b-5; c=c+1;} c=b+c; cout << c<<endl; } } ...
a.cc: In function 'int main()': a.cc:9:4: error: 'n' was not declared in this scope 9 | if(n!=0){b=1000-a; | ^
s395021391
p00444
C++
#include <cstdio> using namespace std; int main() { while(true) { int n; scanf("%d", &n); if(n == 0) break; int change = 1000 - n; int ans = 0; for(int digit = 1; digit < 1000; mul *= 10) { int cur = change / digit % 10; ans += (cur / 5) + (cur % 5); } printf("%d\n", ans); } return 0; }
a.cc: In function 'int main()': a.cc:13:34: error: 'mul' was not declared in this scope 13 | for(int digit = 1; digit < 1000; mul *= 10) { | ^~~
s475137810
p00444
C++
#include <cstdio> int main (int argc, char const* argv[]) { int coin[6]={500,100,50,10,5,1}; int a,r=0,m; while(true){ scanf("%d",&m); if(m==0) break; m=1000-m; r=0 for(int i=0;i<6;i++){ a=m/coin[i]; r+=a; m-=(a*coin[i]); } printf("%d\n",r); } return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:15:12: error: expected ';' before 'for' 15 | r=0 | ^ | ; 16 | for(int i=0;i<6;i++){ | ~~~ a.cc:16:21: error: 'i' was not declared in this scope 16 | for(int i=0;i<6;i++){ | ...
s610395144
p00444
C++
#include<iostream> using namespace std; int p[6] = {500, 100, 50, 10, 5, 1}; int main(){ int n; while(cin >> n, n){ ans = 0; n = 1000 - n; for(int i=0; i < 6; i++){ ans += n / p[i]; n -= n / p[i] * p[i]; } cout << ans << endl; } }
a.cc: In function 'int main()': a.cc:9:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 9 | ans = 0; | ^~~ | abs
s480412804
p00444
C++
coin = [500,100,50,10,5,1] loop do n = gets.chomp.to_i break if n==0 n=1000-n ans = 0 for c in coin ans+=n/c n=n%c end puts ans end
a.cc:1:1: error: 'coin' does not name a type 1 | coin = [500,100,50,10,5,1] | ^~~~
s823603320
p00444
C++
#include<stdio.h> int mian(void){ int n,k; while(0==0){ scanf("%d",&n); if(n==0)break; k=0; k += n /500; n %=500; k += n/100; n %=100; k += n/50; n %= 50; k += n/10; n %= 10; k += n/5; k += n%5; printf("%d\n",k); } return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s854315084
p00444
C++
#include<stdio.h> int mian(void){ int n,k; while(0==0){ scanf("%d",&n); if(n==0)break; k=0; k += n /500; n %=500; k += n/100; n %=100; k += n/50; n %= 50; k += n/10; n %= 10; k += n/5; k += n%5; printf("%d\n",k); } return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s105598559
p00445
C
#include<stdio.h> #include<string.h> #include<windows.h> int main(){ int cnt=0,cut=0,i,f; char a[1001]; scanf("%s",a); f=strlen(a); for(i=0;i<f;i++){ if(a[i]=='J' && a[i+1]=='O' && a[i+2]=='I')cnt+=1; if(a[i]=='I' && a[i+1]=='O' && a[i+2]=='I')cut+=1; } printf("%d\n%d\n",cnt,cut); return 0; }
main.c:3:9: fatal error: windows.h: No such file or directory 3 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s920389896
p00445
C
#include<stdio.h> int main(void){ while(scanf("%s",moji)!=EOF){ int a=0,b=0,i=0; char moji[10000]; while(moji[i+2]!='\0'){ if(moji[i]=='J' && moji[i+1]=='O' && moji[i+2]=='I')a++; else if(moji[i]=='I' && moji[i+1]=='O' && moji[i+2]=='I')b++; i++; } printf("%d\n%d\n",a,b); } return 0; }
main.c: In function 'main': main.c:3:26: error: 'moji' undeclared (first use in this function) 3 | while(scanf("%s",moji)!=EOF){ | ^~~~ main.c:3:26: note: each undeclared identifier is reported only once for each function it appears in
s056698534
p00445
C
#include <string.h> int main(void) { char str[100000]; int i, j; int jcnt, icnt; char str1[4]; while (scanf("%s", str) != EOF){ jcnt = 0; for (i = 0; i < strlen(str) - 2; i++){ if (str[i] == 'J' && str[i + 1] == 'O' && str[i + 2] == 'I'){ jcnt++; } } icnt = 0; for (i = 0; i < strlen(str) - 2; ...
main.c: In function 'main': main.c:11:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 11 | while (scanf("%s", str) != EOF){ | ^~~~~ main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 2 | #include <string.h> +++ |+#include...
s043865301
p00445
C
#include<stdio.h> int main(void){ inj++;int counti,countj; char a[10000]; while(scanf("%s",a)!=EOF){ counti=0; countj=0; for(i=0;a[i]!='\0';i++){ if(a[i+1]=='O'&&a[i+2]=='I'){ if(a[i]=='I')counti++; if(a[i]=='J')countj++; } } printf("%d\n%d\n",counti,countj); } return 0;}
main.c: In function 'main': main.c:3:1: error: 'inj' undeclared (first use in this function); did you mean 'int'? 3 | inj++;int counti,countj; | ^~~ | int main.c:3:1: note: each undeclared identifier is reported only once for each function it appears in main.c:9:5: error: 'i' undeclared (first use in th...
s992311126
p00445
C
#include<stdio.h> int main(void){ int counti,countj; char a[10000]; while(scanf("%s",a)!=EOF){ counti=0; countj=0; for(i=0;a[i]!='\0';i++){ if(a[i+1]=='O'&&a[i+2]=='I'){ if(a[i]=='I')counti++; if(a[i]=='J')countj++; } } printf("%d\n%d\n",counti,countj); } return 0;}
main.c: In function 'main': main.c:9:5: error: 'i' undeclared (first use in this function) 9 | for(i=0;a[i]!='\0';i++){ | ^ main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
s916631847
p00445
C
int main(void) { int i,joi,ioi = 0; char s[11000]; while (scanf("%s",s) != EOF){ joi = 0; ioi = 0; for(i = 0;i <= 10997;i++){ if(s[i] == 'J' && s[i + 1] == 'O' && s[i + 2] == 'I'){ joi++; } if(s[i] == 'I' && s[i + 1] == 'O' && s[i + 2] == 'I'){ ioi++; } } printf("%d\n%d\n",joi,ioi); f...
main.c: In function 'main': main.c:4:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | while (scanf("%s",s) != EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void...
s845958479
p00445
C
#include<stdio.h> int main(){ char ch[100001]; int i=0,joi=0,ioi=0; while(1){ scanf("%s",&ch); if(ch[0]=='')break; for(i=0;;i++){ if(ch[i]==EOF)break; if(ch[i]=='J' && ch[i+1]=='O' && ch[i+2]=='I'){ joi++; } if(ch[i]=='I' && ch[i+1]=='O' && ch[i+2]=='I'){ ioi++; } } printf("%d\n%d\n",joi,ioi); } return 0; }
main.c: In function 'main': main.c:7:11: error: empty character constant 7 | if(ch[0]=='')break; | ^~
s143695552
p00445
C
#include <iostream> #include <map> #include <algorithm> using namespace std; const int N = 80; int ans[N] = { 0 }; int damari[N] = { 0 }; map<int, bool> amari; int main(){ int p, q, r, c, i; bool loop; while(cin >> p >> q){ loop = false; p *= 10; for(i = 0;i < N;++i){ c = 0; while(p >= q){ p -= q;...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s046391995
p00445
C
#include <stdio.h> int main(void) { char a[10001]={}; while(scanf("%s",a)!=EOF){ int j=0,i=0; int n; l=strlen(a); for(n=0;n<l-2;n++){ if(a[n]=='J'&&a[n+1]=='O'&&a[n+2]=='I') j++; if(a[n]=='I'&&a[n+1]=='O'&&a[n+2]=='I') i++; } printf("%d\n%d\n",j,i); } return 0; }
main.c: In function 'main': main.c:9:5: error: 'l' undeclared (first use in this function) 9 | l=strlen(a); | ^ main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in main.c:9:7: error: implicit declaration of function 'strlen' [-Wimplicit-function-declarati...
s752871842
p00445
C
#include <stdio.h> #include <string.h> int main(void) { char a[10001]={}; while(scanf("%s",a)!=EOF){ int j=0,i=0; int n; l=strlen(a); for(n=0;n<l-2;n++){ if(a[n]=='J'&&a[n+1]=='O'&&a[n+2]=='I') j++; if(a[n]=='I'&&a[n+1]=='O'&&a[n+2]=='I') i++; } printf("%d\n%d\n",j,i); } ...
main.c: In function 'main': main.c:9:5: error: 'l' undeclared (first use in this function) 9 | l=strlen(a); | ^ main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
s907546640
p00445
C
#include <stdio.h> int main() { char str[10001]; int i = 0, j = 0, a; while (scanf_s("%s", str) == 1) { for (a = 0;str[a] != '\0';a++) { if (str[a] == 'J'&&str[a + 1] == 'O'&&str[a + 2] == 'I') i++; } for (a = 0;str[a] != '\0';a++) { if (str[a] == 'I'&&str[a + 1] == 'O'&&str[a + 2] == 'I') ...
main.c: In function 'main': main.c:7:24: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | while (scanf_s("%s", str) == 1) { | ^~~~~~~ | scanf