submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s143280388
p00053
C++
#include<cstdio> #include<math> using namespace std; int main(){ int n,i,j,p[10000],sum=0; while(1){ scanf("%d",&n)!=0 if(n==0)break; for(i=2;;i++){ for(j=2;j<=sqrt(i);j++){ if(i%j==0)break; if(j==(int)sqrt(i)){p[n]=i;n--;break;} } if(n==0)break; } for(i=n;i>0;i-...
a.cc:2:9: fatal error: math: No such file or directory 2 | #include<math> | ^~~~~~ compilation terminated.
s725187485
p00053
C++
#include<cstdio> #include<math> using namespace std; int main(){ int n,i,j,p[10000],sum=0; while(1){ scanf("%d",&n) if(n==0)break; for(i=2;;i++){ for(j=2;j<=sqrt(i);j++){ if(i%j==0)break; if(j==(int)sqrt(i)){p[n]=i;n--;break;} } if(n==0)break; } for(i=n;i>0;i--){...
a.cc:2:9: fatal error: math: No such file or directory 2 | #include<math> | ^~~~~~ compilation terminated.
s189619487
p00053
C++
#include<cstdio> #include<cmath> using namespace std; int main(){ int n,i,j,p[10000],sum=0; while(1){ scanf("%d",&n) if(n==0)break; for(i=2;;i++){ for(j=2;j<=sqrt(i);j++){ if(i%j==0)break; if(j==(int)sqrt(i)){p[n]=i;n--;break;} } if(n==0)break; } for(i=n;i>0;i--)...
a.cc: In function 'int main()': a.cc:8:31: error: expected ';' before 'if' 8 | scanf("%d",&n) | ^ | ; 9 | if(n==0)break; | ~~
s034718773
p00053
C++
#include<cstdio> #include<cmath> using namespace std; int prime(int n) { int i, j, d; if (n == 1)return 2; d = prime(n - 1); for (i = d+1;; i++) { for (j = 2;; j++) { if (i%j == 0)break; if (j == i - 1) { return i; } } } } int main() { int n,i, sum = 0; while (scanf_s("%d", &n) && n){ if (n == 0)br...
a.cc: In function 'int main()': a.cc:19:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 19 | while (scanf_s("%d", &n) && n){ | ^~~~~~~ | scanf
s871188242
p00053
C++
#include<cstdio> #include<cmath> using namespace std; int dp[10010]; int prime(int n) { int i, j,d; if (n == 1) { return dp[1] = 2; }; d = dp[n - 1]; for (i = d+1;; i++) { for (j = 2;; j++) { if (i%j == 0)break; if (j == (int)sqrt(i)) { return dp[n] = i; } } } } int main() { int n, i; long long sum =...
a.cc: In function 'int main()': a.cc:21:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 21 | while (scanf_s("%d", &n) && n){ | ^~~~~~~ | scanf
s112609010
p00053
C++
#include<iostream> using namespace std; int n; int tf[400]; int prime[400]; void P(int n){ int t = sqrt(n), k = 0; for (int i = 2; i <= t; i++){ if (tf[i] == 0){ for (int j = 2; j*i <= t; j++){ tf[j*i] = 1; } } } for (int i = 2; i <= t; i++){ if (!tf[i])prime[k++] = i; } } int main(){ P(15000)...
a.cc: In function 'void P(int)': a.cc:9:17: error: 'sqrt' was not declared in this scope 9 | int t = sqrt(n), k = 0; | ^~~~ a.cc:19:34: error: 'k' was not declared in this scope 19 | if (!tf[i])prime[k++] = i; | ^
s644755702
p00053
C++
#include<iostream> using namespace std; bool flag[10010]; int p[10000]; int main(){ int n=1; while (cin >> n, n != 0){ era(n); int sum = 0; for (int i = 0; i < n; i++){ sum += p[i]; } cout << sum << endl; } } void era(int n){ int l = 0; for (int i = 2; i < 12*n && flag[i]==false; i++){ p[l++] = ...
a.cc: In function 'int main()': a.cc:9:17: error: 'era' was not declared in this scope 9 | era(n); | ^~~
s167151903
p00053
C++
#include<iostream> using namespace std; bool flag[10010]; int p[10000]; int main(){ int n=1; while (cin >> n, n != 0){ era(n); int sum = 0; for (int i = 0; i < n; i++){ sum += p[i]; } cout << sum << endl; } } void era(int n){ int l = 0; for (int i = 2; i < 12*n && flag[i]==false; i++){ p[l++] = ...
a.cc: In function 'int main()': a.cc:9:17: error: 'era' was not declared in this scope 9 | era(n); | ^~~
s181463611
p00053
C++
int main(void) { int n,l,j,i; long s; for(;;){ j=0; s = 0; scanf("%d",&n); if(n==0)break; for(i = 2; i<=10000;i++){ l = 2; if(i == 2 || i == 3 ){ j = j+1; s+= i; if(j >= n) break; }else if(i % 2 == 0){ }else if(i > 2){ while(l <=i/2){ if(i % l ==0 ){ l = i; } ...
a.cc: In function 'int main()': a.cc:8:17: error: 'scanf' was not declared in this scope 8 | scanf("%d",&n); | ^~~~~ a.cc:33:17: error: 'printf' was not declared in this scope 33 | printf("%ld\n",s); | ^~~~~~ a.cc:1:1: note: 'printf' is ...
s328576283
p00053
C++
int main(int argc, char* argv[]) { int n,l,j,i; long s; for(;;){ j=0; s = 0; scanf("%d",&n); if(n==0)break; for(i = 2; i<=10000;i++){ l = 2; if(i == 2 || i == 3 ){ j = j+1; s+= i; if(j >= n) break; }else if(i % 2 == 0){ }else if(i > 2){ while(l <=i/2){ if(i % l ==0 ){ ...
a.cc: In function 'int main(int, char**)': a.cc:8:17: error: 'scanf' was not declared in this scope 8 | scanf("%d",&n); | ^~~~~ a.cc:33:17: error: 'printf' was not declared in this scope 33 | printf("%ld\n",s); | ^~~~~~ a.cc:1:1: note: '...
s338807988
p00053
C++
require "prime" table = Prime.each.take(10000); loop do n = gets.to_i break if n==0 subtable = table.take(n) p subtable.inject(:+) end
a.cc:1:1: error: 'require' does not name a type 1 | require "prime" | ^~~~~~~ a.cc:5:1: error: 'loop' does not name a type 5 | loop do | ^~~~
s551141916
p00053
C++
require 'prime' table = Prime.each.take(10000) loop do n = gets.to_i break if n==0 subtable = table.take(n) p subtable.inject(:+) end
a.cc:1:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 1 | require 'prime' | ^~~~~~~ a.cc:1:1: error: 'require' does not name a type 1 | require 'prime' | ^~~~~~~
s421173935
p00053
C++
#include <iostream> using namespace std; int a[20000] = {}; int sosuu() { a[0] = 0; int k = 1, z; for (int i = 2; i<100000 || k<10001; i++) { z = 0; for (int j = 2; j <= sqrt(i); j++) { if (i%j == 0) { z++; break; } } if(z==0){ a[k] = i; k++; } } return 0; } int main(){ sosuu(); ...
a.cc: In function 'int sosuu()': a.cc:11:38: error: 'sqrt' was not declared in this scope 11 | for (int j = 2; j <= sqrt(i); j++) { | ^~~~
s888929199
p00053
C++
#include <iostream> using namespace std; int a[20000] = {}; int sosuu() { a[0] = 0; int k = 1, z; for (int i = 2; i<100000 || k<10001; i++) { z = 0; for (int j = 2; j <= sqrt(i); j++) { if (i%j == 0) { z++; break; } } if(z==0){ a[k] = i; k++; } } return 0; } int main(){ sosuu(); ...
a.cc: In function 'int sosuu()': a.cc:11:38: error: 'sqrt' was not declared in this scope 11 | for (int j = 2; j <= sqrt(i); j++) { | ^~~~
s820021739
p00053
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; class Program { static void Main(string[] args) { while(true){ int n=int.Parse(n1),sum=0; if(n==0){break;}for(int i=1;;i++) { if(n==0){break;}//n--; if(IsPrime(i)) { n--;sum+=i; } }Console.WriteLine(sum); } } ...
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.L...
s271234026
p00053
C++
#include<iostream> using namespace std; int main(){ int n; while(cin >> n,n){ int v[1000000]; for(int i=0;i<1000000;i++) v[i]=1; v[0]=v[1]=0; for(int i=0;i*i<=100000;i++){ if(v[i]){ for(int j=i*2;j<100000;j+=i){ v[j]=0; } } } int s=0,i=0; while(n--){ while(!v[i])i++; s+=i++; }...
a.cc: In function 'int main()': a.cc:21:53: error: expected ';' before '}' token 21 | cout << s << endl;javascript:void(0) | ^ | ; 22 | } | ~ ...
s435424009
p00053
C++
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> const max=104729; char so[104730]; int main(){ int i,j,n,s; memset(so,0,sizeof(so)); so[0]=so[1]=1; for(i=2;i*i<=max;i++){ for(j=2*i;j<=max;j+=i){ so[j]=1; } } while(0<=scanf("%d",&n)){ if(n==0)break; s=0; for(i=1;n;i++)...
a.cc:6:7: error: 'max' does not name a type 6 | const max=104729; | ^~~ a.cc: In function 'int main()': a.cc:16:22: error: 'max' was not declared in this scope; did you mean 'std::max'? 16 | for(i=2;i*i<=max;i++){ | ^~~ | std::max In file ...
s104548545
p00053
C++
#include <iostream> #include <cstdio> #include <vector> using namespace std; #define MAX 1000000 int main() { bitset<MAX> is_prime; is_prime.set(); is_prime[0] = false, is_prime[1] = false; for (int i = 2; i * i <= MAX; i++) { for (int j = i + i; j <= MAX; j += i) { is_prime[j] = false; } } ...
a.cc: In function 'int main()': a.cc:11:3: error: 'bitset' was not declared in this scope 11 | bitset<MAX> is_prime; | ^~~~~~ a.cc:4:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>' 3 | #include <vector> +++ |+#include <bitset> 4 | a....
s307608163
p00053
C++
#include <iostream> using namespace std; int main() { int MAX=INT_MAX; int prime[10000]; bool num[110000]; for(int i=0;i<110000;i++) num[i]=false; num[0]=num[1]=true; for(int i=2;i<MAX;i++) { if(num[i]==true) continue; for(int j=i*2;j<110000;j+=i) num[j]=true; } int pnt=0; for(int i=0;i<110000;i++) { if...
a.cc: In function 'int main()': a.cc:5:17: error: 'INT_MAX' was not declared in this scope 5 | int MAX=INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <iostream> +++ |+#include <cl...
s336584884
p00053
C++
#include <stdio.h> #include <limits.h> #include <time.h> #define NN 10001 int main(int argc,char *argv[]){ /*----宣言----*/ unsigned long long int n; //判定する素数 int i,j,mode; //カウンタ,モード clock_t start,end; //経過時間測定用 int number=0; //1〜1000までの素数の個数 bool flag=true; //フラグ(素数のときtrue、素数でないときfalse) bool prime[NN...
a.cc: In function 'int main(int, char**)': a.cc:68:2: error: expected '}' at end of input 68 | } | ^ a.cc:6:32: note: to match this '{' 6 | int main(int argc,char *argv[]){ | ^
s110684393
p00053
C++
#include <iostream> #include <string> using namespace std; #define NUM 131072 #define LOOTNUM 363 int _tmain(int argc, _TCHAR* argv[]) { bool prime[NUM]; unsigned num; prime[1] = false; prime[2] = true; for(long i = 3; i < NUM; i += 2) { prime[i] = true; } for(long i = 3; i <= LOOTNUM; i += 2) { if(prime...
a.cc:8:22: error: '_TCHAR' has not been declared 8 | int _tmain(int argc, _TCHAR* argv[]) | ^~~~~~
s480936850
p00053
C++
#define NUM 131072 #define LOOTNUM 363 int main(int argc, _TCHAR* argv[]) { bool prime[NUM]; unsigned num; prime[1] = false; prime[2] = true; for(long i = 3; i < NUM; i += 2) { prime[i] = true; } for(long i = 3; i <= LOOTNUM; i += 2) { if(prime[i] == true) for(long j = 2 * i; j < NUM; j += i) prime...
a.cc:4:20: error: '_TCHAR' has not been declared 4 | int main(int argc, _TCHAR* argv[]) | ^~~~~~ a.cc:4:5: warning: second argument of 'int main(int, int**)' should be 'char **' [-Wmain] 4 | int main(int argc, _TCHAR* argv[]) | ^~~~ a.cc: In function 'int main(int, int**)': a....
s206870335
p00053
C++
#include<iostream> #include<math.h> using namespace std; int pnum[10000] = {0}; int dsum[10000] = {0}; int main(){ int N; while(1){ cin >> N; if(N == 0){ break; } return 0; }
a.cc: In function 'int main()': a.cc:14:2: error: expected '}' at end of input 14 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s899934849
p00053
C++
#include<iostream> #include<math.h> using namespace std; int pnum[10000] = {0}; int psum[10000] = {0}; int main(){ int i,j,pcor = 0; int root; for(i = 2;i < 10001;i++){ root = (int)sqrt(double(i))+1; for(j = 0;j < pcor && pnum[j] <= root;j++){ if(i% pnum[j]==0)break; } if(j == pcor || pnum[j] > root){ pnum[pcor] = i; p...
a.cc:35:1: error: expected unqualified-id before 'for' 35 | for(i = 0;i <= dcor;i++){ | ^~~ a.cc:35:11: error: 'i' does not name a type 35 | for(i = 0;i <= dcor;i++){ | ^ a.cc:35:21: error: 'i' does not name a type 35 | for(i = 0;i <= dcor;i++){ | ^ a.cc:38:1: er...
s161653661
p00053
C++
#include<iostream> #include<math.h> using namespace std; int pnum[10000] = {0}; int psum[10000] = {0}; int main(){ int i,j,pcor = 0; int root; for(i = 2;i < 10001;i++){ root = (int)sqrt(double(i))+1; for(j = 0;j < pcor && pnum[j] <= root;j++){ if(i% pnum[j]==0)break; } if(j == pcor || pnum[j] > root){ pnum[pcor] = i; p...
a.cc:35:1: error: expected unqualified-id before 'for' 35 | for(i = 0;i <= dcor;i++){ | ^~~ a.cc:35:11: error: 'i' does not name a type 35 | for(i = 0;i <= dcor;i++){ | ^ a.cc:35:21: error: 'i' does not name a type 35 | for(i = 0;i <= dcor;i++){ | ^ a.cc:38:1: er...
s736694300
p00053
C++
#include <iostream> #include <vector> typedef std::vector <int> vi; vi PRIMES; vi prime(int n){ int i=0,j=1,h=(n+1)/2,x,r=(int)pow(n,.5); vi s(h),p; while(j<=n){ s[i++]=j; j+=2; } p.push_back(2); for (i=1;i<h;i++) if (x=s[i]){ p.push_back(x); if (i<=r) for (j=x*x/2;j<h;j+=x) s[j]=0; } return p; } i...
a.cc: In function 'vi prime(int)': a.cc:6:40: error: 'pow' was not declared in this scope 6 | int i=0,j=1,h=(n+1)/2,x,r=(int)pow(n,.5); | ^~~
s508798854
p00053
C++
#include <iostream> #include <algorithm> using namespace std; void mdm( int prime[] ); int main(){ int j=0 ,n ,ans=0 ,flag=0; while( true ){ cin >> n; if( n == 0 ) break; int prime[10000]; // 素数 int allay[10000]; memset( allay ,0 ,sizeof( allay ) ); if( !flag ) mdm( prime ); // 素数仕分け fl...
a.cc: In function 'int main()': a.cc:13:5: error: 'memset' was not declared in this scope 13 | memset( allay ,0 ,sizeof( allay ) ); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <...
s588671979
p00054
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int a,b,n,ans = 0; a %= b; for(int i = 0; i < n; i++){ a *= 10; ans += a/b; a %= b; } System.out.println(ans); ...
Main.java:9: error: variable a might not have been initialized a %= b; ^ Main.java:9: error: variable b might not have been initialized a %= b; ^ Main.java:10: error: variable n might not have been initialized for(int i = 0; i < n; i++){ ^ 3 errors
s390069578
p00054
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int a,b,n; int ans = 0; a %= b; for(int i = 0; i < n; i++){ a *= 10; ans += a/b; a %= b; } ...
Main.java:10: error: variable a might not have been initialized a %= b; ^ Main.java:10: error: variable b might not have been initialized a %= b; ^ Main.java:11: error: variable n might not have been initialized for(int i = 0; i < n; i++){ ^ 3 errors
s147980793
p00054
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readlLine())!=null){ String[] values=line.split(" "); int a=Integer.parseInt(values[0]); int b=Integer.parseInt(values[1]); int...
Main.java:7: error: cannot find symbol while((line=br.readlLine())!=null){ ^ symbol: method readlLine() location: variable br of type BufferedReader 1 error
s107564793
p00054
Java
import java.io.*; import java.math.BigDecimal; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null){ String[] values=line.split(" "); BigDecimal a=BigDecimal.valueOf(Integer.parse...
Main.java:15: error: cannot find symbol a.substract(b); ^ symbol: method substract(BigDecimal) location: variable a of type BigDecimal Main.java:20: error: cannot find symbol BigDecimal c=a.devide(b); ^ symbol: method devide(BigDecimal) location: variable a of type BigDecimal Main.java:27: er...
s498301677
p00054
Java
import java.io.*; import java.math.BigDecimal; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null){ String[] values=line.split(" "); BigDecimal a=BigDecimal.valueOf(Integer.parse...
Main.java:15: error: cannot find symbol a=a.substract(b); ^ symbol: method substract(BigDecimal) location: variable a of type BigDecimal Main.java:27: error: bad operand types for binary operator '==' if(str.charAt(i)==null){ ^ first type: char second type: <null> Note: Main.java uses or o...
s138665740
p00054
Java
import java.io.*; import java.math.BigDecimal; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null){ String[] values=line.split(" "); BigDecimal a=BigDecimal.valueOf(Integer.parse...
Main.java:26: error: ')' expected if(str.length()==n{ ^ 1 error
s972468755
p00054
Java
import java.util.Scanner; public class Main { static Scanner sc = new java.util.Scanner(System.in); public static void main(String[] args) { while ( sc.hasNext() ){ double a = sc.nextDouble(); double b = sc.nextDouble(); double n = sc.nextDouble(); String ans = "" ; int s = 0 ; for ( in...
Main.java:43: error: reached end of file while parsing } ^ 1 error
s953116622
p00054
Java
import java.util.*; class Main { void run() { Scanner sc = new Scanner(System.in); while(sc.hasNext()) { int a = sc.nextInt(); int b = sc.nextInt(); int n = sc.nextInt(); int tmp; int s = 0; if (a>b) a = a%b; for (int i=0;i<n;i++) { a *= 10; s += a/b;...
Main.java:22: error: ';' expected New Main().run(); ^ 1 error
s041282407
p00054
Java
import java.util.Scanner; public class _0054 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while(scan.hasNext()){ int a = scan.nextInt(); int b = scan.nextInt(); int n = scan.nextInt(); a%=b; int s = 0; for (int i = 0; i < n; i++) { s+=a*10/b; a=a*...
Main.java:4: error: class _0054 is public, should be declared in a file named _0054.java public class _0054 { ^ 1 error
s550588460
p00054
Java
public class Main { public static void main(String[] args) { //declare int a,b,n,mod,s; String[] str; //input Scanner sc = new Scanner(System.in); while(sc.hasNext()){ str = sc.nextLine().split("\\s"); a = Integer.parseInt(str[0]); b = Inte...
Main.java:11: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:11: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s876833497
p00054
Java
import java.util.Scanner; public class Test { public static void main(String[] args){ Scanner scan = null; try{ double a , b; int n; scan = new Scanner(System.in); while(scan.hasNextInt()){ a = scan.nextInt(); b = scan.nextInt(); n = scan.nextInt(); double m =(a / b); m -= (int)m;...
Main.java:4: error: class Test is public, should be declared in a file named Test.java public class Test { ^ 1 error
s609205046
p00054
C
#include <stdio.h> int main(){ int a, b, n, s; double f; while(scanf("%d %d %d", &a, &b, &n) != EOF){ f = (double)a / b; s = 0; while(i--){ s += (int)(f * 10) % 10; f *= 10; } printf("%d\n", s); } return...
main.c: In function 'main': main.c:11:15: error: 'i' undeclared (first use in this function) 11 | while(i--){ | ^ main.c:11:15: note: each undeclared identifier is reported only once for each function it appears in
s312916451
p00054
C
#include <stdio.h> #include <math.h> int main(void){ int sum,n; double a,b; double m; char str[100]; for( ;fgets(str,sizeof(str),stdin)!=NULL; ){ sscanf(str,"%lf %lf %d",&a,&b,&n); sum=0; m=(a/b); m=fmod(m,1.0); while(n--){ m*=10; sum+=(m)/1; m=fmod(m,1.0); ???????????????????????????????????...
main.c: In function 'main': main.c:18:1: error: expected expression before '?' token 18 | ????????????????????????????????????if(m=0) break; | ^
s443499657
p00054
C
#include <stdio.h> #include <math.h> int main(void){ int sum,n; double a,b; double m; char str[100]; for( ;fgets(str,sizeof(str),stdin)!=NULL; ){ sscanf(str,"%lf %lf %d",&a,&b,&n); sum=0; m=(a/b); m=fmod(m,1.0); while(n--){ m*=10; sum+=(m)/1; m=fmod(m,1.0); ???????????????????????????????????...
main.c: In function 'main': main.c:18:1: error: expected expression before '?' token 18 | ????????????????????????????????????if(m=0) break; | ^
s569697123
p00054
C
#include <stdio.h> #include <math.h> int main(void){ int sum,n; double a,b; double m; char str[100]; for( ;fgets(str,sizeof(str),stdin)!=NULL; ){ sscanf(str,"%lf %lf %d",&a,&b,&n); sum=0; m=(a/b); m=fmod(m,1.0); while(n--){ m*=10; sum+=(m)/1; m=fmod(m,1.0); ???????????????????????????????????...
main.c: In function 'main': main.c:18:1: error: expected expression before '?' token 18 | ???????????????????????????????????? | ^
s551769823
p00054
C
#include <stdio.h> #define rep(i,j,k) for(i = j;i <= k;i++) int main(){ int a,b,n,amari; while(scanf("%d%d%d",&a,&b,&n) != EOF){ int i,sum,temp; amari = a - (a / b) * b; sum = 0; rep(i,1,n){ temp = (amari * 10) / b sum += temp; amari = amari*10 - b*temp; } printf("%d\n",su...
main.c: In function 'main': main.c:11:30: error: expected ';' before 'sum' 11 | temp = (amari * 10) / b | ^ | ; 12 | sum += temp; | ~~~
s440914708
p00054
C
#include <Stdio.h> int sum ( int a , int b , int n ) { int i , sum = 0; while ( a > b ) { a /= b; } for ( i = 0; i < n; i++ ) { if ( a < b ) a *= 10; sum += a / b; a = a % b; } return sum; } int main (void) { int a , b , n; while ( scanf("%d %d %d",&a,&b,&n) != EOF ) { int ans; ans = sum(a,b,n...
main.c:1:10: fatal error: Stdio.h: No such file or directory 1 | #include <Stdio.h> | ^~~~~~~~~ compilation terminated.
s752618973
p00054
C
main(a,b,n,s){for(;s=0,~scanf("%d%d%d",&a,&b&n);printf("%d\n",s))for(a%=b;n;--n)a*=10,sum+=a/b,a%=b;}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(a,b,n,s){for(;s=0,~scanf("%d%d%d",&a,&b&n);printf("%d\n",s))for(a%=b;n;--n)a*=10,sum+=a/b,a%=b;} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'b' defaul...
s393432378
p00054
C
#include<stdio.h> int main() { int a,b,c,i,j,r; while(scanf("%d%d%d",&a,&b,&c)==3) { r=0; for(i=0;i<c;i++) { a<b?a*=10:a=a/b*10; j=a/b; r+=j; if((a-=b*j)==0) break; } printf("%d\n",r); } return 0; }
main.c: In function 'main': main.c:10:36: error: lvalue required as left operand of assignment 10 | a<b?a*=10:a=a/b*10; | ^
s018219864
p00054
C
#include <stdio.h> #include <stdlib.h> int main(){ int a, b; double c; char str[100]; int n, s; int i; while(1){ ret = scanf("%d %d %d", &a, &b, &n); if(ret == EOF){ break; } s = 0; c = (double)a/(double)b; str[0] = '\0'; snprintf(str, sizeof(str), "%f", c); for(i...
main.c: In function 'main': main.c:16:17: error: 'ret' undeclared (first use in this function) 16 | ret = scanf("%d %d %d", &a, &b, &n); | ^~~ main.c:16:17: note: each undeclared identifier is reported only once for each function it appears in
s884885200
p00054
C++
#include<iostream> using namespace std; int main(){ int a, b, n, sum; double c; while(cint >> a >> b >> n){ sum = 0; c = a / b; for(int i=0; i<n; i++, c * 10){ sum += (int)c % 10; } cout << sum << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'cint' was not declared in this scope; did you mean 'uint'? 9 | while(cint >> a >> b >> n){ | ^~~~ | uint
s114024466
p00054
C++
#include <iostream> using namespace std; const int INF=1<<29; signed main(){ int a, b, c; while(cin >> a){ cin >> b >> c; int s=0 for(int i=10;a*i<INF;i*=10) s+=a*i%10; cout << s << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:1: error: expected ',' or ';' before 'for' 9 | for(int i=10;a*i<INF;i*=10) s+=a*i%10; | ^~~ a.cc:9:16: error: 'i' was not declared in this scope 9 | for(int i=10;a*i<INF;i*=10) s+=a*i%10; | ^
s974329490
p00054
C++
#include<stdio.h> int main(){ double s=0; int d=10; int A=0: int n; double a,b; while(scanf("%lf %lf %d",&a,&b,&n)!=EOF){ int S=0; for(int i=0;i<n;i++) {s=a/b; A=(int)A; s-=A; s*=10; A=(int)A; S+=A; } printf("%d\n",S); } return 0; }
a.cc: In function 'int main()': a.cc:7:8: error: expected ',' or ';' before ':' token 7 | int A=0: | ^ a.cc:11:33: error: 'n' was not declared in this scope 11 | while(scanf("%lf %lf %d",&a,&b,&n)!=EOF){ | ^
s523695188
p00054
C++
int main(){ int a,b,n; while(cin>>a>>b>>n){ int ans = 0; a %= b; for(int i = 0; i < n; i++){ a *= 10; ans += a/b; a %= b; } cout<<ans<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:3:15: error: 'cin' was not declared in this scope 3 | while(cin>>a>>b>>n){ | ^~~ a.cc:11:17: error: 'cout' was not declared in this scope 11 | cout<<ans<<endl; | ^~~~ a.cc:11:28: error: 'endl' was not declared ...
s212491658
p00054
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,n; while(cin >> a >> b >> n){ int k = a % b * 10; s = 0; for(int i=0;i<n;i++){ s += k / b; k = k % b * 10; } cout << s << endl; } }
a.cc: In function 'int main()': a.cc:8:5: error: 's' was not declared in this scope 8 | s = 0; | ^
s067773938
p00054
C++
object Main{ def main(args: Array[String]): Unit = { var sc = new java.util.Scanner(System.in) while(sc.hasNext){ var a:Double = sc.nextDouble var b:Double = sc.nextDouble var n:Int = sc.nextInt var nor:String = (a/b - Math.floor(a/b)).toString() + "00000000" var list = new Array...
a.cc:1:1: error: 'object' does not name a type 1 | object Main{ | ^~~~~~
s244141577
p00054
C++
#include<bits/stdc++.h> using namespace std; int main(){ double a,b,c; while(cin>>a>>b>>c){ int sum=0; a=a%b*10; while(c--){ sum+=a/b; a=a%b*10; } cout<<sum<<endl; } }
a.cc: In function 'int main()': a.cc:7:8: error: invalid operands of types 'double' and 'double' to binary 'operator%' 7 | a=a%b*10; | ~^~ | | | | | double | double a.cc:10:10: error: invalid operands of types 'double' and 'double' to binary 'operator%' 10 | ...
s439414239
p00054
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); String str = null; String strSplit = null; String[] strs; int point = 0; int a = 0; int b = 0; int ans = 0; int n = 0; double f = 0; while(stdin.hasNext()) { a...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s715604627
p00054
C++
#include <iostream> using namespace std;int main(){int a,b,n,s,m,i;for(s=0;cin>>a>>b>>n;m=a%b*10){for(i=0;i<n;i++,s+=m/b,m=m%b*10);puts(s);}}
a.cc: In function 'int main()': a.cc:2:117: error: invalid conversion from 'int' to 'const char*' [-fpermissive] 2 | using namespace std;int main(){int a,b,n,s,m,i;for(s=0;cin>>a>>b>>n;m=a%b*10){for(i=0;i<n;i++,s+=m/b,m=m%b*10);puts(s);}} | ...
s575564865
p00054
C++
#include<iostream>main(){for(int a,b,n,s;std::cin>>a>>b>>n;printf("%d\n",s))for(s=0;n-->0;s+=a/b%10)a*=10;}
a.cc:1:23: warning: extra tokens at end of #include directive 1 | #include<iostream>main(){for(int a,b,n,s;std::cin>>a>>b>>n;printf("%d\n",s))for(s=0;n-->0;s+=a/b%10)a*=10;} | ^ a.cc:1:9: fatal error: iostream>mai: No such file or directory 1 | #include<iostream>main(){for(int a,b,n,...
s541860253
p00054
C++
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String args[]) { while(sc.hasNext()) { int a = sc.nextInt(); int b = sc.nextInt(); int n = sc.nextInt(); int sum = 0; for(int i = 0; i < n; i++) { a *= 10; sum += (a / b) % 10; a ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s826118214
p00054
C++
import java.util.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main { int INF = 1 << 28; void run() { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int a = sc.nextInt(); int b = sc.nextInt(); int n = sc.nextInt(); a = a%b; int ans = 0; for(int...
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import static java.lang.Math.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-...
s410593651
p00054
C++
a,b,n;main(s){for(;s=~scanf("%d%d%d",&a,&b,&n);printf("%d\n",s))for(s=0,a=a%b;n--;a%=b)a*=10,s+=a/b;}
a.cc:1:1: error: 'a' does not name a type 1 | a,b,n;main(s){for(;s=~scanf("%d%d%d",&a,&b,&n);printf("%d\n",s))for(s=0,a=a%b;n--;a%=b)a*=10,s+=a/b;} | ^ a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token 1 | a,b,n;main(s){for(;s=~scanf("%d%d%d",&a,&b,&n);printf("%d\n",s...
s137683592
p00054
C++
#include <iostream> #include <cmath> using namespace std; int main(){ double a,b,n; int sum,s,p; cin >> a >> b >> n sum = 0; for(int i = 1 ; i <= n ; i++){ s = (a/b)*pow(10,i); sum += s%10; } cout << sum << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: expected ';' before 'sum' 7 | cin >> a >> b >> n | ^ | ; 8 | sum = 0; | ~~~
s643742791
p00055
Java
import java.util.*; public class YOBI { Scanner sc = new Scanner(System.in); public static void main(String[] args) { new YOBI(); } public YOBI() { new aoj0055().doIt(); } class aoj0055{ void change(int a[]){ a[3] = 1; } void doIt() { int a[] = {1,2,3,4,5}; for(int i = 0;i < 5;i++){ Syste...
Main.java:4: error: class YOBI is public, should be declared in a file named YOBI.java public class YOBI { ^ 1 error
s458355617
p00055
Java
import java.io.*; import java.math.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null){ BigDecimal n=BigDecimal.valueOf(Integer.parseInt(line)); for(int i=0;i<4;i++){ n=n.mult...
Main.java:14: error: cannot find symbol System.out.println(n.floatValue); ^ symbol: variable floatValue location: variable n of type BigDecimal 1 error
s892124795
p00055
Java
import java.io.*; import java.math.*; ?? class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null){ double n=Double.parseDouble(line); duouble sum=n; for(int i=0;i<9;i++){ if(i%2==0){ n...
Main.java:3: error: class, interface, enum, or record expected ?? ^ 1 error
s425970467
p00055
Java
import java.io.*; import java.math.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null){ double n=Double.parseDouble(line); duouble sum=n; for(int i=0;i<9;i++){ if(i%2==0){ n*=...
Main.java:10: error: cannot find symbol duouble sum=n; ^ symbol: class duouble location: class Main Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s057461343
p00055
Java
import java.util.*; public class Main{public static void main(String[] a){Scanner sc=new Scanner(System.in);for(;sc.hasNextDouble();)System.out.println(7.8148148*sc.nextDouble()); }
Main.java:3: error: reached end of file while parsing } ^ 1 error
s487478905
p00055
Java
import java.util.Scanner; class Main { public static void main(String...args){ Scanner in = new Scanner(System.in); while(in.hasNext()) { double[] s = new double[10]; double ans = 0.0; double a=in.nextDouble(); d[0]=a; for(int i=1;i<10;i++){ if(i%2!=0) s[i]=s[i-1]*2; else s[i]=s[i-1]/3; ans+=s[i]; } System.out.println(...
Main.java:9: error: cannot find symbol d[0]=a; ^ symbol: variable d location: class Main 1 error
s543118003
p00055
C
#include <stdio.h> int main(void){ long double a; while(scanf("%lf",&a) != EOF){ printf("%f\n",a*211/27); return 0; }
main.c: In function 'main': main.c:8:1: error: expected declaration or statement at end of input 8 | } | ^
s995250925
p00055
C
#include<iostream> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<vector> #include<cmath> #include<cstdio> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #define mp make_pair #define it ::iterator #define all(in) in.begin(),in.end...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s688169359
p00055
C
#include<stdio.h> int main(void){ float n,s; while (scanf("%f",&n) != EOF){ s = n; for (i = 2;i <= 10;i++){ if (i % 2 == 0){ n = n * 2.00f; s = s + n; } else{ n = n / 3.00f; s = s + n; ...
main.c: In function 'main': main.c:7:14: error: 'i' undeclared (first use in this function) 7 | for (i = 2;i <= 10;i++){ | ^ main.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
s813201540
p00055
C
#include<math.h> int main(void) { double a, s,n; int i; while (scanf("%lf", &a) != EOF) { s = a; n = a; for (i = 2; i <= 10; i++) { if (i % 2 == 0) { s *= 2.0; n += s; printf("s = %lf\n",s); } else { s /= 3.0; n += s; printf("s = %lf\n", s); } } printf("%.8lf\n",n); ...
main.c: In function 'main': main.c:8:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | while (scanf("%lf", &a) != EOF) { | ^~~~~ main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 1 | #include<math.h> +++ |+#include <s...
s459238299
p00055
C
main(fenv_t a){for(;~scanf("%lf",&a);)printf("%f\n",a*211/27);}
main.c:1:6: error: unknown type name 'fenv_t' 1 | main(fenv_t a){for(;~scanf("%lf",&a);)printf("%f\n",a*211/27);} | ^~~~~~
s305255263
p00055
C
main(){for(float a;~scanf("%f",&a);)printf("%f\n",a*211./27);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){for(float a;~scanf("%f",&a);)printf("%f\n",a*211./27);} | ^~~~ main.c: In function 'main': main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(){for(float a;~scanf("%f",&a);)pri...
s910789092
p00055
C
#include <iostream> #include <cstdio> using namespace std; int main(void){ double x; while(cin>>x){ double sum = x; for(int i=0;i<9;i++){ if(i % 2 == 0) x *= 2; else x /= 3; sum += x; } printf("%.8lf\n",sum); } return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s400350864
p00055
C
main(i,double a){for(;~scanf("%lf",&a);puts(gcvt(a*211/27,9)));}
main.c:1:8: error: expected ')' before 'double' 1 | main(i,double a){for(;~scanf("%lf",&a);puts(gcvt(a*211/27,9)));} | ^~~~~~ | )
s882945788
p00055
C
i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
main.c:1:1: warning: data definition has no type or storage class 1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:1:3: error: return type ...
s544043408
p00055
C
main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;} | ^~~~ main.c: In function 'main': main.c:1:22: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(){float x;while(s...
s168936342
p00055
C
#include<stdio.h>main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;} | ^~~~ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): unde...
s562327907
p00055
C
#include<stdio.h> int main() { double n,a; int i; while(scanf("%lf",&n)!=EOF) { a=n; for(i=2;i<11;i++) a+=(i%2==0?n*=2:n/=3); printf("%f\n",a); } }
main.c: In function 'main': main.c:11:42: error: lvalue required as left operand of assignment 11 | a+=(i%2==0?n*=2:n/=3); | ^~
s330655925
p00055
C
#include<stdio.h> int main() { double n,a; int i; while(scanf("%lf",&n)!=EOF) { a=n; for(i=2;i<11;i++) a+=(i%2==0?n*=2:n/=3); printf("%f\n",a); } return 0; }
main.c: In function 'main': main.c:11:42: error: lvalue required as left operand of assignment 11 | a+=(i%2==0?n*=2:n/=3); | ^~
s652921783
p00055
C
#include<stdio.h> int main() { double n,a; int i; while(scanf("%lf",&n)!=EOF) { a=n; for(i=2;i<11;i++) { i%2==0?n*=2:n/=3; a+=n; } printf("%f\n",a); } return 0; }
main.c: In function 'main': main.c:12:38: error: lvalue required as left operand of assignment 12 | i%2==0?n*=2:n/=3; | ^~
s916830738
p00055
C
include<stdio.h> int main(){ int i; double a=0,count=0; i=0; while(1){ scanf("%lf",&a); count+=a; for(;i<9;i++){ if((i%2)==0){ count+=a*2.0; a=a*2.0; } else{ count+=a/3.0; a=a/3.0; } } printf("%.8f\n",count); count=0; i=0; } return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s143939572
p00055
C
include<stdio.h> int main(){ int i; double a=0,count=0; i=0; while(1){ scanf("%lf",&a); count+=a; for(;i<9;i++){ if((i%2)==0){ count+=a*2.0; a=a*2.0; } else{ count+=a/3.0; a=a/3.0; } } printf("%.8f\n",count); count=0; i=0; } return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s985567618
p00055
C
#include<cstdio> int main(){ double sum; double a; int i; while(~scanf("%lf",&a)){ sum=0; sum+=a; for(i=2;i<=10;i++){ if(i%2==0){ a=2*a; }else{ a=a/3; } sum+=a; } printf("%f\n",sum...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s560866529
p00055
C++
float f[i];
a.cc:1:9: error: 'i' was not declared in this scope 1 | float f[i]; | ^
s869977682
p00055
C++
#include <iostream> #include <stdio.h> #include <array> using namespace std; double a_1; double s_n; std::array<double , 10> arr ; double fib(int i){ if(i ==1){ }else if(i % 2 == 0){ arr[i] = arr[i-1] * 2; }else{ arr[i] = arr[i-1] / 3; } return arr[i]; } int main(void){ std::cin >> a_1; arr[1...
a.cc: In function 'int main()': a.cc:30:44: error: expected ';' before '}' token 30 | printf("%lf", s_n);javascript:void(0) | ^ | ; 31 | } | ~
s269959401
p00055
C++
#include <stdio.h> #include <array> using namespace std; double a_1; double s_n; array<double , 10> arr ; double fib(int i){ if(i ==1){ }else if(i % 2 == 0){ arr[i] = arr[i-1] * 2; }else{ arr[i] = arr[i-1] / 3; } return arr[i]; } int main(void){ std::cin >> a_1; arr[1] = a_1; scanf("%lf", ...
a.cc: In function 'int main()': a.cc:23:8: error: 'cin' is not a member of 'std' 23 | std::cin >> a_1; | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <array> +++ |+#include <iostream> 4 |
s670388731
p00055
C++
#include <stdio.h> using namespace std; double a_1; double s_n; array<double , 10> arr ; double fib(int i){ if(i ==1){ }else if(i % 2 == 0){ arr[i] = arr[i-1] * 2; }else{ arr[i] = arr[i-1] / 3; } return arr[i]; } int main(void){ std::cin >> a_1; arr[1] = a_1; scanf("%lf", &a_1); for(int...
a.cc:8:1: error: 'array' does not name a type 8 | array<double , 10> arr ; | ^~~~~ a.cc: In function 'double fib(int)': a.cc:13:5: error: 'arr' was not declared in this scope 13 | arr[i] = arr[i-1] * 2; | ^~~ a.cc:15:5: error: 'arr' was not declared in this scope 15 | arr[i] = arr[i-1]...
s152044342
p00055
C++
#include <iostream> using namespace std; int main() { double n; while (cin >> n) { double nums[10] = {n}; for(int i=1;i<10;++i) { if ((i+1)%2) nums[i] = num[i-1]/3; else nums[i] = nums[i-1]*2; } double sum = 0.0; for(int i=0;i < 10;...
a.cc: In function 'int main()': a.cc:11:36: error: 'num' was not declared in this scope; did you mean 'nums'? 11 | if ((i+1)%2) nums[i] = num[i-1]/3; | ^~~ | nums
s640660107
p00055
C++
#include<iostream> #include<vector> #include<string> #include<string.h> #include<math.h> #include<utility> #include<algorithm> #include<functional> using namespace std; int main() { while(cin>>a) { double a=0; double s=0; s=a; for(int i=0;i<4;i++) { a=2*a; s=s+a; ...
a.cc: In function 'int main()': a.cc:15:16: error: 'a' was not declared in this scope 15 | while(cin>>a) | ^
s644552141
p00055
C++
#include<iostream> #include<cstdio> using namespace std; #define int long long signed main(){ double a; while( scanf("%lf", &a) != EOF ){ double sum = a; for(int i=1;i<10;i++){ if(i%2 == 0) a /= 3; else a *= 2; sum += a; } cout << sum << endl; } return 0; } KAGUYA:AOJ0
a.cc:18:7: error: found ':' in nested-name-specifier, expected '::' 18 | KAGUYA:AOJ0 | ^ | :: a.cc:18:1: error: 'KAGUYA' does not name a type 18 | KAGUYA:AOJ0 | ^~~~~~
s132746968
p00055
C++
#include<bits/stdc++.h> using namespace std; #define all(vec) vec.begin(),vec.end() typedef long long int ll; typedef pair<int,int> P; const ll MOD=1000000007; const ll INF=1000000010; const ll LINF=4000000000000000010LL; const int MAX=310; const double EPS=1e-9; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int main(){ ...
a.cc: In function 'int main()': a.cc:27:30: error: expected ';' before '}' token 27 | printf("%.9lf\n",sum) | ^ | ; 28 | } | ~
s049896887
p00055
C++
#include<bits/stdc++.h> using namespace std; #define all(vec) vec.begin(),vec.end() typedef long long int ll; typedef pair<int,int> P; const ll MOD=1000000007; const ll INF=1000000010; const ll LINF=4000000000000000010LL; const int MAX=310; const double EPS=1e-9; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int main(){ ...
a.cc: In function 'int main()': a.cc:27:30: error: expected ';' before '}' token 27 | printf("%.9lf\n",sum) | ^ | ; 28 | } | ~
s473694997
p00055
C++
#import<stdlib.h> main(a){for(;~scanf("%as",&a);)printf("%f\n",atof(a)*211/27);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<stdlib.h> | ^~~~~~ a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token 2 | main(a){for(;~scanf("%as",&a);)printf("%f\n",atof(a)*211/27);} | ^
s502170743
p00055
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int i,j,n; double sum=0,im,im2[1000]; while(cin >> im){ sum=0; im2[1]=im; sum+=im; for(i=2;i<=10;i++){ if(i%2 == 0){ im2[i]=im2[i-1]*2; sum+=im2[i]; } else{ im2[i]=im2[i-1]/3; sum+=im2[i]; } //...
a.cc: In function 'int main()': a.cc:28:4: error: expected '}' at end of input 28 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s602093108
p00055
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int i,j,n; double sum=0,im,im2[1000]; while(cin >> im){ sum=0; im2[1]=im; sum+=im; for(i=2;i<=10;i++){ if(i%2 == 0){ im2[i]=im2[i-1]*2; sum+=im2[i]; } else{ im2[i]=im2[i-1]/3; sum+=im2[i]; } //...
a.cc: In function 'int main()': a.cc:28:4: error: expected '}' at end of input 28 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s028533203
p00055
C++
i,main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
a.cc:1:1: error: 'i' does not name a type 1 | i,main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}} | ^
s099303456
p00055
C++
i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
a.cc:1:1: error: 'i' does not name a type 1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}} | ^ a.cc:1:3: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | i;main(){double a,s;while(scanf("%f",&a)!=...
s103832358
p00055
C++
#include <iostream> #include <cstdio> using namespace std; int main() { double n,tmp,sum=0,s[11] while(scanf("%lf",&n)!=EOF) { sum=0; tmp = n; for(int i=1;i<=10;i++) { if(i==1) { } else if(i%2==0) { tmp *=2; } else { tmp /=3; } sum += tmp; } printf("%.8f",sum); } r...
a.cc: In function 'int main()': a.cc:7:9: error: expected initializer before 'while' 7 | while(scanf("%lf",&n)!=EOF) | ^~~~~
s206474610
p00055
C++
include<cstdio> #include<iostream> using namespace std; int main(){ double a,b=7.81481481481481; while(1){ scanf("%lf",&a); printf("%f\n",a*b); } }
a.cc:1:1: error: 'include' does not name a type 1 | include<cstdio> | ^~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, fro...