submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s065929732 | p03795 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
for(i = 1; i < N; i++){
int pow = pow * i;
int ans = pow % (Math.pow(10.0,9.0)+7.0);
}
System.out.println(ans);
}
}
| Main.java:12: error: incompatible types: possible lossy conversion from double to int
int ans = pow % (Math.pow(10.0,9.0)+7.0);
^
Main.java:14: error: cannot find symbol
System.out.println(ans);
^
symbol: variable ans
location: class Main
2 errors
|
s052752600 | p03795 | Java | import java.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System. in);
int n = sc.nextInt();
x = 800 * n;
y = n / 15 * 200;
x - y = ans;
System.out.println(ans);
}
}
| Main.java:1: error: package java does not exist
import java.*;
^
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System. in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System. in);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find symbol
x = 800 * n;
^
symbol: variable x
location: class Main
Main.java:7: error: cannot find symbol
y = n / 15 * 200;
^
symbol: variable y
location: class Main
Main.java:8: error: cannot find symbol
x - y = ans;
^
symbol: variable x
location: class Main
Main.java:8: error: cannot find symbol
x - y = ans;
^
symbol: variable y
location: class Main
Main.java:8: error: cannot find symbol
x - y = ans;
^
symbol: variable ans
location: class Main
Main.java:9: error: cannot find symbol
System.out.println(ans);
^
symbol: variable ans
location: class Main
9 errors
|
s089389131 | p03795 | Java | public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System. in);
int n = sc.nextInt();
x = 800 * n;
y = n / 15 * 200;
x - y = ans;
println(ans); | Main.java:8: error: reached end of file while parsing
println(ans);
^
1 error
|
s029742910 | p03795 | C | #include <stdio.h>
int main(void){
int n;
scanf("%d", &n);
a = n * 800 - (n / 15) * 200;
printf("%d\n", a);
return 0;
}
| main.c: In function 'main':
main.c:6:3: error: 'a' undeclared (first use in this function)
6 | a = n * 800 - (n / 15) * 200;
| ^
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
|
s150229977 | p03795 | Java | package spring21;
public class ABC055_A {
public static void main(String[] args){
int N=20,x,y;
x=N*800;
y=200*(N/15);
System.out.println(x-y);
}
} | Main.java:3: error: class ABC055_A is public, should be declared in a file named ABC055_A.java
public class ABC055_A {
^
1 error
|
s126652378 | p03795 | C++ | n=gets.to_i
puts 800*n-200*(n/15) | a.cc:1:1: error: 'n' does not name a type
1 | n=gets.to_i
| ^
|
s045573567 | p03795 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int x = 0, y = 0;
for(int i = 1; i <= N; i++){
x += 800;
if(i % 15 == 0) y += 200;
}
System.out.println(x-y);
}
}
| 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:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s891985667 | p03795 | C | #include <stdio.h>
int main() {
int n;
scanf_s("%d", &n);
printf("%d\n", n * 800 - n / 15 * 200);
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s771411166 | p03795 | Java | import java.util.Scanner;
public class Restaurant {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int in = scan.nextInt();
System.out.println(in * 800 - (in/15)*200);
scan.close();
}
} | Main.java:3: error: class Restaurant is public, should be declared in a file named Restaurant.java
public class Restaurant {
^
1 error
|
s311668273 | p03795 | Java | import java.util.Scanner;
public class Restaurant {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int in = scan.nextInt();
System.out.println(in * 800 - (in/15)*200);
scan.close();
}
}
| Main.java:3: error: class Restaurant is public, should be declared in a file named Restaurant.java
public class Restaurant {
^
1 error
|
s992025623 | p03795 | Java | public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int in = scan.nextInt();
System.out.println(in * 800 - (in/15)*200);
} | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s642503900 | p03795 | Java | import java.util.Scanner;
public class Restaurant {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int in = scan.nextInt();
System.out.println(in * 800 - (in/15)*200);
}
} | Main.java:3: error: class Restaurant is public, should be declared in a file named Restaurant.java
public class Restaurant {
^
1 error
|
s319566855 | p03795 | Java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package atcoderjava;
import java.util.Scanner;
/**
*
* @author takaesumizuki
*/
public class AtcoderJava {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner sc = new Scanner(System.in);
String str = sc.next();
Integer eat = new Integer(str);
Integer refundMoney = eat/15*200;
Integer payMoney = eat * 800;
Integer diffMoney = payMoney - refundMoney;
System.out.println(diffMoney);
}
}
| Main.java:14: error: class AtcoderJava is public, should be declared in a file named AtcoderJava.java
public class AtcoderJava {
^
Main.java:23: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
Integer eat = new Integer(str);
^
1 error
1 warning
|
s258149920 | p03795 | C | #include<stdio.h>
int main()
{
int s,c;
int q,w;
int e,r;
scanf_s("%d",&s);
scanf_s("%d",&c);
q=s*2;
/* if(c>q)
{
w=c-q;
e=w/4;
r=e+s;
printf("%d",r);
}*/
if(c<=q)
{
if(0==c%2)
{
w=c/2;
printf("%d",w);
}
if(0!=c%2)
{
c--;
w=c/2;
printf("%d",w);
}
}
} | main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scanf_s("%d",&s);
| ^~~~~~~
| scanf
|
s625591134 | p03795 | C++ | #include<stdio.h>
int main()
{
int s,c;
int q,w;
int e,r;
scanf_s("%d",&s);
scanf_s("%d",&c);
q=s*2;
if(c>q)
{
w=c-q;
e=w/4;
r=e+s;
printf("%d",r);
}
if(c==q)
{
printf("%d",s);
}
if(c<q)
{
if(0==c%2)
{
w=c/2;
printf("%d",w);
}
if(0!=c%2)
{
c--;
w=c/2;
printf("%d",w);
}
}
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | scanf_s("%d",&s);
| ^~~~~~~
| scanf
|
s271571916 | p03795 | C++ | #include<stdio.h>
int main()
{
int s,c,q,w,e,r;
scanf_s("%d",&s);
scanf_s("%d",&c);
q=s*2;
if(c>q)
{
w=c-q;
e=w/4;
r=e+s;
printf("%d",r);
}
if(c==q)
{
printf("%d",s);
}
if(c<q)
{
if(0==c%2)
{
w=c/2;
printf("%d",w);
}
if(0!=c%2)
{
c--;
w=c/2;
printf("%d",w);
}
}
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
5 | scanf_s("%d",&s);
| ^~~~~~~
| scanf
|
s412944500 | p03795 | C++ | #include <iostream>
#include <cmath>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i;
}
remainder = remainder%pow(10, 9) + 7;
std::cout << remainder << std::endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:22: error: invalid operands of types 'int' and 'double' to binary 'operator%'
10 | remainder = remainder%pow(10, 9) + 7;
| ~~~~~~~~~^~~~~~~~~~~
| | |
| int double
|
s995386216 | p03795 | C++ | #include <iostream>
#include <cmath>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i;
}
remainder = remainder%pow(10, 9) + 7
std::cout << remainder << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:22: error: invalid operands of types 'int' and 'double' to binary 'operator%'
10 | remainder = remainder%pow(10, 9) + 7
| ~~~~~~~~~^~~~~~~~~~~
| | |
| int double
|
s906923542 | p03795 | C++ | #include <iostream>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i;
remainder = (double)remainder % (10e+9 +7);
}
std::cout << remainder << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:33: error: invalid operands of types 'double' and 'double' to binary 'operator%'
9 | remainder = (double)remainder % (10e+9 +7);
| ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
| | |
| double double
|
s422812051 | p03795 | C++ | #include <iostream>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i;
remainder = remainder % (10e+9 +7);
}
std::cout << remainder << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:25: error: invalid operands of types 'int' and 'double' to binary 'operator%'
9 | remainder = remainder % (10e+9 +7);
| ~~~~~~~~~ ^ ~~~~~~~~~~
| | |
| int double
|
s821226717 | p03795 | C++ | #include <iostream>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i
remainder = remainder % (10e+9 +7);
}
std::cout << remainder << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'remainder'
8 | remainder *= i
| ^
| ;
9 | remainder = remainder % (10e+9 +7);
| ~~~~~~~~~
|
s398492096 | p03795 | C++ | #include <iostream>
int main() {
int x=0, y=0, N=0;
std::cin >> N;
x = 800*N;
int z = N/15;
y = z*200;
reutrn (x-y);
} | a.cc: In function 'int main()':
a.cc:11:1: error: 'reutrn' was not declared in this scope
11 | reutrn (x-y);
| ^~~~~~
|
s902037778 | p03795 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <cmath>
#include <map>
#include <fstream>
#include <copy>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
template <typename T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v){
if(!v.empty()) {
out << '[';
std::copy(v.begin(), v.end(), std::ostream_iterator<T>(out, ", "));
out << "\b\b]";
}
return out;
}
template <typename T1, typename T2>
std::ostream &operator<<(std::ostream &out, const std::pair<T1, T2> &p) {
out << "[" << p.first << ", " << p.second << "]";
return out;
}
//---------
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
//CLion Standard Input for DEBUG
//--------------------------------------------------------------------------
// ifstream in("/Users/ryo/Dropbox/competition/CompetitivePrograming/in.txt");
// cin.rdbuf(in.rdbuf());
//-------------------------------------------------------------------------
int n;
cin >> n;
cout << 800 * n - 200 * (n / 15)<< endl;
} | a.cc:14:10: fatal error: copy: No such file or directory
14 | #include <copy>
| ^~~~~~
compilation terminated.
|
s055190911 | p03795 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <cmath>
#include <map>
#include <fstream>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
template <typename T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v){
if(!v.empty()) {
out << '[';
std::copy(v.begin(), v.end(), std::ostream_iterator<T>(out, ", "));
out << "\b\b]";
}
return out;
}
template <typename T1, typename T2>
std::ostream &operator<<(std::ostream &out, const std::pair<T1, T2> &p) {
out << "[" << p.first << ", " << p.second << "]";
return out;
}
//---------
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
//CLion Standard Input for DEBUG
//--------------------------------------------------------------------------
// ifstream in("/Users/ryo/Dropbox/competition/CompetitivePrograming/in.txt");
// cin.rdbuf(in.rdbuf());
//-------------------------------------------------------------------------
int n;
cin >> n;
cout << 800 * n - 200 * (n / 15)<< endl;
} | a.cc: In function 'std::ostream& operator<<(std::ostream&, const std::vector<_Tp>&)':
a.cc:25:44: error: 'ostream_iterator' is not a member of 'std'
25 | std::copy(v.begin(), v.end(), std::ostream_iterator<T>(out, ", "));
| ^~~~~~~~~~~~~~~~
a.cc:14:1: note: 'std::ostream_iterator' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
13 | #include <fstream>
+++ |+#include <iterator>
14 |
a.cc:25:62: error: expected primary-expression before '>' token
25 | std::copy(v.begin(), v.end(), std::ostream_iterator<T>(out, ", "));
| ^
|
s434757570 | p03795 | C++ | #include<iostream>
using namespace std;
int main(){
long long a,b;
std::cin>>a>>b;
if(a=>(b/2)){
std::cout<<(b/2);
}else{
std::cout<<(a+((b-2*a)/4));
}
} | a.cc: In function 'int main()':
a.cc:6:14: error: expected primary-expression before '>' token
6 | if(a=>(b/2)){
| ^
|
s087270844 | p03795 | C++ | #include <iostream>
#include <math.h>
using namespace std;
int main()
{
int N, pre_p = 1, cur_p = 1;
cin >> N;
for (int i = 1; i < N; i++)
{
pre_p = cur_p;
cur_p = pre_p * i;
}
cout << cur_p % (pow(10,9) + 7);
return 0;
} | a.cc: In function 'int main()':
a.cc:16:19: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
16 | cout << cur_p % (pow(10,9) + 7);
| ~~~~~ ^ ~~~~~~~~~~~~~~~
| | |
| int __gnu_cxx::__promote<double>::__type {aka double}
|
s910034080 | p03795 | C++ |
x = N * 800;
y = N / 15 * 200
print(x-y) | a.cc:2:1: error: 'x' does not name a type
2 | x = N * 800;
| ^
a.cc:3:1: error: 'y' does not name a type
3 | y = N / 15 * 200
| ^
|
s608426091 | p03795 | C++ | #include <iostream>
#include<stdio.h>
using namespace std;
int main(void) {
int N;
cin >> N;
int x = 1;
for (int i = 0; i < N; i++)
{
x = modx(x,N+1);
}
cout << x << endl;
}
int modx(int x,int y) {
return (x*y) % 1000000007;
} | a.cc: In function 'int main()':
a.cc:11:21: error: 'modx' was not declared in this scope
11 | x = modx(x,N+1);
| ^~~~
|
s532190925 | p03795 | C++ | #include<iostream>
using namespace std;
int main(){
int n,sum;
cin>>n;
sum=800*n;
sum-=200*(n/15)
cout<<sum<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before 'cout'
11 | sum-=200*(n/15)
| ^
| ;
12 |
13 | cout<<sum<<endl;
| ~~~~
|
s167942659 | p03795 | C++ | import Control.Applicative
main = do
n <- readLn :: IO Int
putStrLn $ show $ n * 800 - n `div` 15 * 200 | a.cc:5:35: error: stray '`' in program
5 | putStrLn $ show $ n * 800 - n `div` 15 * 200
| ^
a.cc:5:39: error: stray '`' in program
5 | putStrLn $ show $ n * 800 - n `div` 15 * 200
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import Control.Applicative
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s765208203 | p03795 | C | #include<stdio.h>
int main()
{
int i;
scanf("%d",&i);
print("%d",i*800-i/15*200);
return 0;
} | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
6 | print("%d",i*800-i/15*200);
| ^~~~~
| printf
|
s432447211 | p03795 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int N = cin.nextInt();
int x = N * 800;
int y = (N / 15) * 200;
System.out.println(x - y);
}
} | 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:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s470170695 | p03795 | C++ | #include <stdafx.h>
#include <stdio.h>
int main () {
long long int N,i;
int a[10000],b[10000],c,j,k;
scanf("%lld", &N);
char S[10000],T[10000];
scanf("%s", S);
for(i=0;i<N;i++){
if (S[i]=='o') a[i]=1;
if (S[i]=='x') a[i]=-1;
}
for(j=-1;j<=1;j=j+2){
for(k=-1;k<=1;k=k+2){
b[0]=j, b[1]=k;
for(i=0;i<N-2;i++){
if(b[i+1]*a[i+1]==1) b[i+2]=b[i];
if(b[i+1]*a[i+1]==-1) b[i+2]=-b[i];
}
if(a[N-1]*b[N-1]==b[N-2]*b[0] && a[0]*b[0]==b[N-1]*b[1]) {
for(i=0;i<N;i++){
if(b[i]==1) T[i]='S';
if(b[i]==-1) T[i]='W';
}
for(i=0;i<N;i++){
printf("%c",T[i]);
}
printf("\n");
return 0;
}
}
}
printf("-1\n");
return 0;
} | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include <stdafx.h>
| ^~~~~~~~~~
compilation terminated.
|
s719975365 | p03795 | Java | package ABC;
import java.util.Scanner;
public class ABC055A {
public static void main(){
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
System.out.println((N*800)-(N/15));
}
}
| Main.java:5: error: class ABC055A is public, should be declared in a file named ABC055A.java
public class ABC055A {
^
1 error
|
s852855184 | p03795 | C++ | #include <iostream>
int main()
{
int N=0;
std::cin >> N;
int sum=0;
for(int i=1;i<N+1;i++)
{
sum+=800;
if(i % 15 == 0)
sum-=200;
}
sum >> std::cout >> std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:18:5: error: no match for 'operator>>' (operand types are 'int' and 'std::ostream' {aka 'std::basic_ostream<char>'})
18 | sum >> std::cout >> std::endl;
| ~~~ ^~ ~~~~~~~~~
| | |
| int std::ostream {aka std::basic_ostream<char>}
a.cc:18:5: note: candidate: 'operator>>(int, int)' (built-in)
18 | sum >> std::cout >> std::endl;
| ~~~~^~~~~~~~~~~~
a.cc:18:5: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:18:13: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'int'
18 | sum >> std::cout >> std::endl;
| ^~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:18:1: note: cannot convert 'sum' (type 'int') to type 'std::byte'
18 | sum >> std::cout >> std::endl;
| ^~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:18:13: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'int'
18 | sum >> std::cout >> std::endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:18:13: note: mismatched types 'std::basic_istream<char, _Traits>' and 'int'
18 | sum >> std::cout >> std::endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:18:13: note: mismatched types 'std::basic_istream<char, _Traits>' and 'int'
18 | sum >> std::cout >> std::endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:18:13: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'int'
18 | sum >> std::cout >> std::endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:18:13: note: mismatched types 'std::basic_istream<char, _Traits>' and 'int'
18 | sum >> std::cout >> std::endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:18:13: note: mismatched types 'std::basic_istream<char, _Traits>' and 'int'
18 | sum >> std::cout >> std::endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = int&; _Tp = std::basic_ostream<char>&]':
a.cc:18:13: required from here
18 | sum >> std::cout >> std::endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s358377992 | p03795 | C++ | #include <iostream>
int main()
{
int N=0;
N << std::cin;
int sum=0;
for(int i=1;i<N+1;i++)
{
sum+=800;
if(i % 15 == 0)
sum-=200;
}
sum >> std::cout >> std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: no match for 'operator<<' (operand types are 'int' and 'std::istream' {aka 'std::basic_istream<char>'})
7 | N << std::cin;
| ~ ^~ ~~~~~~~~
| | |
| int std::istream {aka std::basic_istream<char>}
a.cc:7:3: note: candidate: 'operator<<(int, int)' (built-in)
7 | N << std::cin;
| ~~^~~~~~~~~~~
a.cc:7:3: note: no known conversion for argument 2 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<_CharT, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<_CharT, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:7:1: note: cannot convert 'N' (type 'int') to type 'std::byte'
7 | N << std::cin;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<_CharT, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<_CharT, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<_CharT, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<char, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<char, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<char, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<_CharT, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<_CharT, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<char, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<char, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed:
a.cc:7:11: note: mismatched types 'std::basic_ostream<char, _Traits>' and 'int'
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
/usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = int&; _Tp = std::basic_istream<char>]':
a.cc:7:11: required from here
7 | N << std::cin;
| ^~~
/usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
a.cc:18:5: error: no match for 'operator>>' (operand types are 'int' and 'std::ostream' {aka 'std::basic_ostream<char>'})
18 | sum >> std::cout >> std::endl;
| ~~~ ^~ ~~~~~~~~~
| | |
| int std::ostream {aka std::basic_ostream<char>}
a.cc:18:5: note: candidate: 'operator>>(int, int)' (built-in)
18 | sum >> std::cout >> std::endl;
| ~~~~^~~~~~~~~~~~
a.cc:18:5: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:18:13: note: mismatched types 'std::basic_istream<_CharT, _Traits>' and 'int'
18 | sum >> std::cout >> std::endl;
| ^~~~
/usr/include/c++/14/cstddef:131:5: note: candidate: ' |
s093175497 | p03795 | C++ | #include<iostream>
int main(void){
int N,t;
std::cin>>N;
t=N/15;
std::cout>>((800*N)-(500*t));
return 0;
} | a.cc: In function 'int main()':
a.cc:6:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
6 | std::cout>>((800*N)-(500*t));
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:6:14: note: candidate: 'operator>>(int, int)' (built-in)
6 | std::cout>>((800*N)-(500*t));
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:6:14: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:6:32: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
6 | std::cout>>((800*N)-(500*t));
| ~~~~~^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:6:32: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:6:32: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:6:32: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:6:32: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:6:32: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:6:32: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:6:32: required from here
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s090309310 | p03795 | C++ | #include<iostream>
int main(void){
int N,t;
std::cin>>N;
t=N%15;
std::cout>>((800*N)-(500*t));
return 0;
} | a.cc: In function 'int main()':
a.cc:6:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
6 | std::cout>>((800*N)-(500*t));
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:6:10: note: candidate: 'operator>>(int, int)' (built-in)
6 | std::cout>>((800*N)-(500*t));
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:6:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:6:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:6:6: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
6 | std::cout>>((800*N)-(500*t));
| ~~~~~^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:6:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:6:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:6:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:6:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:6:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:6:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:6:28: required from here
6 | std::cout>>((800*N)-(500*t));
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s670683806 | p03795 | C++ | #include <bts/stdc++.h>
using namespace std;
int main()
{
int N;
cin >> N;
cout << (N * 800 - N / 15 * 200) << endl;
return 0;
} | a.cc:1:10: fatal error: bts/stdc++.h: No such file or directory
1 | #include <bts/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s129813127 | p03795 | C++ | #include <bts/stdc++.h>
using namespace std;
int main()
{
int N;
cin >> N;
cout << (N * 20 - N / 15) << endl;
return 0;
} | a.cc:1:10: fatal error: bts/stdc++.h: No such file or directory
1 | #include <bts/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s110483585 | p03795 | C++ | include <cstdio>
using namespace std;
int main(void){
int N=0;
int x,y=0;
scanf("%d",&N);
x=N*800;
y=N/15;
y*=200;
printf("%d\n",x-y);
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <cstdio>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:6: error: 'scanf' was not declared in this scope
6 | scanf("%d",&N);
| ^~~~~
a.cc:10:6: error: 'printf' was not declared in this scope
10 | printf("%d\n",x-y);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | include <cstdio>
|
s461260503 | p03795 | C++ |
int N;
cin >> N;
if((N<1)||(N>100001)){
return 0;
}
int i;
int poi=1;
double po=1.0;
for(i=1; i<=N ; i++){
po=po*i;
// if(poi>=(pow(9.0,10)+7)){
// po=(double)poi;
// po=po/(1000000000.0+7.0);
// poi=(int)po;
// }
}
poi=(int)(po/(pow(9.0,10.0)+7.0));
cout << poi;
} | a.cc:4:3: error: 'cin' does not name a type
4 | cin >> N;
| ^~~
a.cc:5:3: error: expected unqualified-id before 'if'
5 | if((N<1)||(N>100001)){
| ^~
a.cc:12:3: error: expected unqualified-id before 'for'
12 | for(i=1; i<=N ; i++){
| ^~~
a.cc:12:12: error: 'i' does not name a type
12 | for(i=1; i<=N ; i++){
| ^
a.cc:12:19: error: 'i' does not name a type
12 | for(i=1; i<=N ; i++){
| ^
a.cc:21:3: error: 'poi' does not name a type
21 | poi=(int)(po/(pow(9.0,10.0)+7.0));
| ^~~
a.cc:22:3: error: 'cout' does not name a type
22 | cout << poi;
| ^~~~
a.cc:25:1: error: expected declaration before '}' token
25 | }
| ^
|
s015029145 | p03795 | Java | あ | Main.java:1: error: reached end of file while parsing
?
^
1 error
|
s831549847 | p03795 | C++ | ソースコード
#include <iostream>
using namespace std;
int main() {
int n, p, i;
cin >> n;
p = 1;
for (i = 1; i <= n; ++i) p *= i;
cout << p % (1000000007) << '\n';
// your code goes here
return 0;
} | a.cc:4:1: error: extended character is not valid in an identifier
4 |
| ^
a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type
1 | ソースコード
| ^~~~~~~~~~~~
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,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:164:72: error: expected primary-expression before 'const'
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared
171 | void operator delete(void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared
173 | void operator delete[](void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| |
s066422450 | p03795 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int N = sc.nextInt();
return N*800 - 200*(N/15);
}
} | Main.java:7: error: incompatible types: unexpected return value
return N*800 - 200*(N/15);
^
1 error
|
s932074946 | p03795 | Java | import java.util.Scanner;
/**
* Created by User on 2017/02/18.
*/
public class Main2 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
System.out.println(getPower(n));
}
public static long getPower(int n) {
if (n <= 1) return 1;
return (n % 1000000007) * (getPower(((n + 1000000007) - 1) % 1000000007) % 1000000007);
}
}
| Main.java:6: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s573567905 | p03795 | C++ | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int price = n * 800;
price = price - 200*(n/15);
System.out.println(price);
}
} | 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:2:1: error: 'import' does not name a type
2 | import java.io.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main{
| ^~~~~~
|
s512777153 | p03795 | C++ | #include<stdio.h>
#include<math.h>
int main(){
long n, fact,i;
fact = 1;
scanf("%ld", &n);
for(i=1; i<=n; ++i) {
fact = fact * i;
};
printf("%d\n", fact%(pow(10,9) + 7));
return 0;
} | a.cc: In function 'int main()':
a.cc:13:22: error: invalid operands of types 'long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
13 | printf("%d\n", fact%(pow(10,9) + 7));
| ~~~~^~~~~~~~~~~~~~~~
| | |
| long int __gnu_cxx::__promote<double>::__type {aka double}
|
s385440025 | p03795 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int N = sc.nextInt();
return N*800 - 200*(N/15);
}
} | Main.java:7: error: incompatible types: unexpected return value
return N*800 - 200*(N/15);
^
1 error
|
s436368198 | p03795 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int x = N*800;
int y = N/15*200
System.out.println(x-y);
}
}
| Main.java:8: error: ';' expected
int y = N/15*200
^
1 error
|
s356785854 | p03795 | C | include <stdio.h>
int main (void){
int M,N,a,b,c,d;
scanf("%d %d",&M,&N);
a=2*M+N;
b=(a-a%4)/4;
if (N>=2*b) printf("%d\n",b);
if (N<2*b) {
c=(N-N%2)/2;
printf("%d\n",c);
}
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s889237237 | p03795 | C++ | x = STDIN.gets
x = x.to_i
puts (x*800) - ((x/15)*200)
| a.cc:1:1: error: 'x' does not name a type
1 | x = STDIN.gets
| ^
|
s702487669 | p03795 | C++ | #include <iostream>
int main() {
int n;
cin >> n;
cout << (int)(n * 800 - (n / 15) * 200) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | cout << (int)(n * 800 - (n / 15) * 200) << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:6:52: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
6 | cout << (int)(n * 800 - (n / 15) * 200) << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s822387104 | p03795 | C++ | #include<stdio.h>
#include<math.h>
int main(){
int N;
scanf("%d", &n);
printf("%d\n", n*800 + 200*((n+1)%15));
return 0;
} | a.cc: In function 'int main()':
a.cc:6:16: error: 'n' was not declared in this scope
6 | scanf("%d", &n);
| ^
|
s269005526 | p03795 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
cin >> N;
cout << N*800 - ((N%15)*200);
return 0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: 'N' was not declared in this scope
10 | cin >> N;
| ^
|
s861662627 | p03795 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
int N;
cin >> N;
long long back = ceil(N/15) *200;
long long price = N*800 - back;
cout << price << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:26: error: 'ceil' was not declared in this scope
11 | long long back = ceil(N/15) *200;
| ^~~~
|
s947205648 | p03795 | C++ | #include <iostream>
using namespace std
int main() {
int a;
cin >> a;
cout << 800*a - a%15*200 << endl;
} | a.cc:2:20: error: expected ';' before 'int'
2 | using namespace std
| ^
| ;
3 |
4 | int main() {
| ~~~
|
s626301864 | p03795 | C++ | #include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int N;
cin >> N;
cout << ((N * 800) - ((N / 15) * 200));
return 0;
} | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s494280784 | p03795 | C++ | Last login: Sat Feb 18 20:08:29 on ttys000
Xycas-MacBookPro:~ xyca$ ls
Desktop Downloads Movies Pictures terminal
Documents Library Music Public
Xycas-MacBookPro:~ xyca$ cd te
-bash: cd: te: No such file or directory
Xycas-MacBookPro:~ xyca$ cd terminal/
Xycas-MacBookPro:terminal xyca$ ls
Xycas-MacBookPro:terminal xyca$ pwd
/Users/xyca/terminal
Xycas-MacBookPro:terminal xyca$ ls
Xycas-MacBookPro:terminal xyca$ mkdir atcoder
Xycas-MacBookPro:terminal xyca$ ls
atcoder
Xycas-MacBookPro:terminal xyca$ cd atcoder/
Xycas-MacBookPro:atcoder xyca$ ls
Xycas-MacBookPro:atcoder xyca$ mkdir 055
Xycas-MacBookPro:atcoder xyca$ cd 055/
Xycas-MacBookPro:055 xyca$ emacs 1.cpp
Xycas-MacBookPro:055 xyca$ g++ 1.cpp
Xycas-MacBookPro:055 xyca$ ./a.out
20
15800
Xycas-MacBookPro:055 xyca$ ./a.out
60
47200
Xycas-MacBookPro:055 xyca$ ls
1.cpp a.out
Xycas-MacBookPro:055 xyca$ ls 1.cpp
1.cpp
Xycas-MacBookPro:055 xyca$ less 1.cpp
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
int n;
scanf(" %d",&n);
printf("%d\n",n*800-(n/15)*200);
return 0;
} | a.cc:1:27: error: invalid digit "8" in octal constant
1 | Last login: Sat Feb 18 20:08:29 on ttys000
| ^~
a.cc:1:1: error: 'Last' does not name a type
1 | Last login: Sat Feb 18 20:08:29 on ttys000
| ^~~~
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,
from a.cc:33:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:164:72: error: expected primary-expression before 'const'
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared
171 | void operator delete(void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared
173 | void operator delete[](void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
|
s286738273 | p03795 | C++ | a = gets.to_i
x = a * 800
y = (a / 15) * 200
puts (x-y) | a.cc:1:1: error: 'a' does not name a type
1 | a = gets.to_i
| ^
|
s940194675 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll result[a] = {0};
ll factfastaf(ll n)
{
if (n >= 0)
{
result[0] = 1;
for (ll i = 1; i <= n; ++i)
{
result[i] = i * result[i - 1];
}
return result[n];
}
}
int main()
{
ll n;
cin>>n;
ll r= factfastaf(n);
cout<<(r%10000007);
return 0;
}
| a.cc:4:11: error: 'a' was not declared in this scope
4 | ll result[a] = {0};
| ^
a.cc: In function 'll factfastaf(ll)':
a.cc:9:9: error: 'result' was not declared in this scope
9 | result[0] = 1;
| ^~~~~~
|
s351005666 | p03796 | C++ | #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int pw=1;
long long int a=1000000000+7;
for(long long int i=1;i<=n;i++){
i =i%a;
pw *=i;
pw =pw%a
}
cout<< pw <<endl;
} | a.cc: In function 'int main()':
a.cc:15:15: error: expected ';' before '}' token
15 | pw =pw%a
| ^
| ;
16 | }
| ~
|
s461206298 | p03796 | C | #include <iostream>
#include<string>
#include<math.h>
#include<algorithm>
#include<vector>
using namespace std;
#define mod 1000000007
int main()
{
long long n,f=1; cin >> n;
for (int i = 1; i < n; ++i)
{
f =(f* i)%mod;
}
cout << (f*n)%mod;
}
| main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s232199343 | p03796 | C | #include<stdio.h>
int main(void){
int N;
long p=1;
scanf("%d",&N);
for(int i=1;i<N+1;i++){
p *= i;
}
p %= 1000000007;
printf("%ld\n",p);
return 0; | main.c: In function 'main':
main.c:13:3: error: expected declaration or statement at end of input
13 | return 0;
| ^~~~~~
|
s744960183 | p03796 | C++ | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define REP(i, n) for(ll i = 1; i < n + 1; i++)
#define PI 3.14159265359
#define EPS 0.0000000001
#define MOD 1000000007
//cout << std::fixed << std::setprecision(15) << y << endl;
int main(){
ll N;
cin >> N;
ll ans = 1:
REP(i, N){
ans *= i;
ans %= MOD;
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:29:15: error: expected ',' or ';' before ':' token
29 | ll ans = 1:
| ^
a.cc:30:9: error: 'i' was not declared in this scope
30 | REP(i, N){
| ^
a.cc:18:33: note: in definition of macro 'REP'
18 | #define REP(i, n) for(ll i = 1; i < n + 1; i++)
| ^
|
s435045616 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long int n,i=1,ans=1;
cin>>n;
for(i=1,i<=n;i++){
ans*=i;
ans%=10000000007;
}
cout<<ans<<endl | a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before ')' token
7 | for(i=1,i<=n;i++){
| ^
| ;
a.cc:11:18: error: expected ';' at end of input
11 | cout<<ans<<endl
| ^
| ;
a.cc:11:18: error: expected '}' at end of input
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s610178684 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define m 1e9+7
int main()
{
ll n;
cin>>n;
ll ans =1;
for(int i=1;i<=n;i++)
{
ans = (ans*i)%m;
}
cout<<ans;
} | a.cc: In function 'int main()':
a.cc:13:19: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
13 | ans = (ans*i)%m;
| ~~~~~~~^
| |
| ll {aka long long int}
|
s251321824 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
long long p = 1;
cin >> n;
for(int i = 1; i <= n; i++){
p *= i;
if(p >= 1000000007) p %= 1000000007;
cout << p << endl;
}
| a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s026118161 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
long long p = 1;
cin >> n;
for(int i = 1; i <= n; i++){
p *= i;
if(p >= 1000000007) p %= 1000000007;
cout << p << endl;
}
| a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s845842281 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N ;
int X=1;
for (int i = 0; i < N; i++) {
X=X*i%((1e9)+7);
}
cout << X << endl;
}
| a.cc: In function 'int main()':
a.cc:8:10: error: invalid operands of types 'int' and 'double' to binary 'operator%'
8 | X=X*i%((1e9)+7);
| ~~~^~~~~~~~~~
| | |
| int double
|
s432708189 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N ;
int X=1;
for (int i = 0; i < N; i++) {
X=X*i%((10**9)+7);
}
cout << X << endl;
}
| a.cc: In function 'int main()':
a.cc:8:16: error: invalid type argument of unary '*' (have 'int')
8 | X=X*i%((10**9)+7);
| ^~
|
s430941122 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N ;
int X=1;
for (int i = 0; i < N; i++) {
X*=i%((10**9)+7);
}
cout << X << endl;
}
| a.cc: In function 'int main()':
a.cc:8:15: error: invalid type argument of unary '*' (have 'int')
8 | X*=i%((10**9)+7);
| ^~
|
s481090979 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N ;
int X=1;
for (i = 0; i < N; i++) {
X*=i%((10**9)+7)
}
cout << X << endl;
} | a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
7 | for (i = 0; i < N; i++) {
| ^
a.cc:8:15: error: invalid type argument of unary '*' (have 'int')
8 | X*=i%((10**9)+7)
| ^~
|
s361760757 | p03796 | C++ | #include <iostream>
using namespace std;
const int MOD = 1e9+7;
int main(){
int n ; cin >> n;
long long power = 1;
for(int i = 1; i <= n; ++i){
power *= i
power %= MOD;
}
cout << power << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before 'power'
9 | power *= i
| ^
| ;
10 | power %= MOD;
| ~~~~~
|
s774851295 | p03796 | C++ | import math
N = int(input())
print(math.factorial(N) % (10**9+7)) | a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s724841496 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans = 1;
int show=pow(10,9)+7
for (int i=1;i<=N;i++) {
ans =(ans*i)%show;
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
9 | for (int i=1;i<=N;i++) {
| ^~~
a.cc:9:16: error: 'i' was not declared in this scope
9 | for (int i=1;i<=N;i++) {
| ^
|
s676638187 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using LL = long long;
using P = pair<int,int>;
int main(){
int N, M;
cin >> N >> M;
rep(i,M){
int s, c;
if(s>N) ok = false;
:
}
| a.cc: In function 'int main()':
a.cc:14:25: error: 'ok' was not declared in this scope
14 | if(s>N) ok = false;
| ^~
a.cc:15:17: error: expected primary-expression before ':' token
15 | :
| ^
a.cc:17:2: error: expected '}' at end of input
17 | }
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s418105767 | p03796 | C++ | #include <iostream>
#include <cstdint>
using namespace std;
int main() {
int n;
int64_t power=1;
cin >> n;
for(int i=1; i<n+1; i++) {
power *= i;
}
power /= 10**9+7
cout << power << endl;
} | a.cc: In function 'int main()':
a.cc:14:15: error: invalid type argument of unary '*' (have 'int')
14 | power /= 10**9+7
| ^~
|
s748677661 | p03796 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N;
}
cout << sum%(pow(10,9)+7) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:14: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
15 | cout << sum%(pow(10,9)+7) << endl;
| ~~~^~~~~~~~~~~~~~
| | |
| long long int __gnu_cxx::__promote<double>::__type {aka double}
|
s431454226 | p03796 | C++ | #include<bits/stdc++.h>
#include<cmath>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N;
}
cout << sum%(pow(10,9)+7) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:14: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
15 | cout << sum%(pow(10,9)+7) << endl;
| ~~~^~~~~~~~~~~~~~
| | |
| long long int __gnu_cxx::__promote<double>::__type {aka double}
|
s376966850 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N;
}
cout << sum%(pow(10,9)+7) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:14: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
14 | cout << sum%(pow(10,9)+7) << endl;
| ~~~^~~~~~~~~~~~~~
| | |
| long long int __gnu_cxx::__promote<double>::__type {aka double}
|
s449841031 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N;
}
cout << sum << endl;
retutn 0;
} | a.cc: In function 'int main()':
a.cc:16:3: error: 'retutn' was not declared in this scope
16 | retutn 0;
| ^~~~~~
|
s314407664 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N
}
cout << sum << endl;
retutn 0;
} | a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before '}' token
11 | sum *= N
| ^
| ;
12 | }
| ~
a.cc:16:3: error: 'retutn' was not declared in this scope
16 | retutn 0;
| ^~~~~~
|
s723382277 | p03796 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int n;
cin >> n;
long ans = 1;
for(int i = 1;i <= n;i++){
ans *= i;
}
cout << ans % (1e9l + 7) << endl;
}
| a.cc: In function 'int main()':
a.cc:11:16: error: invalid operands of types 'long int' and 'long double' to binary 'operator%'
11 | cout << ans % (1e9l + 7) << endl;
| ~~~ ^ ~~~~~~~~~~
| | |
| long int long double
|
s577068944 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
typedef long long ll; // long long型をこのように定義することで時間短縮
int main() {
cout << fixed << setprecision(10);
int n;
cin >> n;
ll ans = 1; // long long型にしておく
for(int i=1; i<=n; i++){
ans = ans*i%MOD; //掛け算一回ごとにあまりをとる
}
cout << ans << endl;
}
| a.cc:7:22: error: extended character is not valid in an identifier
7 | typedef long long ll; // long long型をこのように定義することで時間短縮
| ^
a.cc:7:22: error: '\U00003000' does not name a type
7 | typedef long long ll; // long long型をこのように定義することで時間短縮
| ^~
|
s853765617 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int N;
int main()
{
cin>>N;
int x = 1;
for (int i = 1; i <= N; i++)
{
ans *= i;
ans %= 1000000007;
}
cout << ans << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
13 | ans *= i;
| ^~~
| abs
a.cc:17:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
17 | cout << ans << endl;
| ^~~
| abs
|
s107259011 | p03796 | C++ | #define cout(x) cout<<(x)<<endl
#define all(v) v.begin(), v.end()
using namespace std;
//型エイリアス
using vi = vector<int>;
using ll = long long;
using P = pair<int,int>;
using Mat = vector<vector<int>>;
const ll inf = 1e18;
const int N = 2e5+10;
int main(){
int n;
cin >> n;
ll factorial=1;
ll thr = 1e9;
for(int i=1;i<=n;++i){
factorial = (factorial*i)%(thr +7);
};
cout<<factorial<<endl;
return 0;
} | a.cc:5:12: error: 'vector' does not name a type
5 | using vi = vector<int>;
| ^~~~~~
a.cc:7:11: error: 'pair' does not name a type
7 | using P = pair<int,int>;
| ^~~~
a.cc:8:13: error: 'vector' does not name a type
8 | using Mat = vector<vector<int>>;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:14:5: error: 'cin' was not declared in this scope
14 | cin >> n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #define cout(x) cout<<(x)<<endl
a.cc:21:5: error: 'cout' was not declared in this scope
21 | cout<<factorial<<endl;
| ^~~~
a.cc:21:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:22: error: 'endl' was not declared in this scope
21 | cout<<factorial<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #define cout(x) cout<<(x)<<endl
|
s969243358 | p03796 | C++ | #define cout(x) cout<<(x)<<endl
#define all(v) v.begin(), v.end()
using namespace std;
//型エイリアス
using vi = vector<int>;
using ll = long long;
using P = pair<int,int>;
using Mat = vector<vector<int>>;
const ll inf = 1e18;
const int N = 2e5+10;
int main(){
int n;
cin >> n;
ll factorial=1;
ll thr = 1e9;
for(int i=1;i<=n;++i){
factorial = (factorial*i)%(thr +7);
};
cout<<factorial<<endl;
return 0;
} | a.cc:5:12: error: 'vector' does not name a type
5 | using vi = vector<int>;
| ^~~~~~
a.cc:7:11: error: 'pair' does not name a type
7 | using P = pair<int,int>;
| ^~~~
a.cc:8:13: error: 'vector' does not name a type
8 | using Mat = vector<vector<int>>;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:14:5: error: 'cin' was not declared in this scope
14 | cin >> n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #define cout(x) cout<<(x)<<endl
a.cc:21:5: error: 'cout' was not declared in this scope
21 | cout<<factorial<<endl;
| ^~~~
a.cc:21:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:22: error: 'endl' was not declared in this scope
21 | cout<<factorial<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #define cout(x) cout<<(x)<<endl
|
s568957060 | p03796 | C++ | #define cout(x) cout<<(x)<<endl
#define all(v) v.begin(), v.end()
using namespace std;
//型エイリアス
using vi = vector<int>;
using ll = long long;
using P = pair<int,int>;
using Mat = vector<vector<int>>;
const ll inf = 1e18;
const int N = 2e5+10;
int main(){
int n;
cin >> n;
ll factorial=1;
for(int i=1;i<=n;++i){
factorial = (factorial*i)%(1e9+7);
};
cout<<factorial<<endl;
return 0;
} | a.cc:5:12: error: 'vector' does not name a type
5 | using vi = vector<int>;
| ^~~~~~
a.cc:7:11: error: 'pair' does not name a type
7 | using P = pair<int,int>;
| ^~~~
a.cc:8:13: error: 'vector' does not name a type
8 | using Mat = vector<vector<int>>;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:14:5: error: 'cin' was not declared in this scope
14 | cin >> n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #define cout(x) cout<<(x)<<endl
a.cc:18:34: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
18 | factorial = (factorial*i)%(1e9+7);
| ~~~~~~~~~~~~~^~~~~~~~
| | |
| | double
| ll {aka long long int}
a.cc:20:5: error: 'cout' was not declared in this scope
20 | cout<<factorial<<endl;
| ^~~~
a.cc:20:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:22: error: 'endl' was not declared in this scope
20 | cout<<factorial<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #define cout(x) cout<<(x)<<endl
|
s775445284 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long s=1;
cin >> N;
for (int i = 1; i <= N; i++) {
s *= i;
}
cout << s %= 1000000007;;
}
| a.cc: In function 'int main()':
a.cc:15:12: error: no match for 'operator%=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int')
15 | cout << s %= 1000000007;;
| ~~~~~~~~~~^~~~~~~~~~~~~
|
s620295131 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long s=1;
cin >> N;
for (int i = 1; i <= N; i++) {
s *= i;
}
cout << s%=1000000007;
}
| a.cc: In function 'int main()':
a.cc:15:14: error: no match for 'operator%=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int')
15 | cout << s%=1000000007;
| ~~~~~~~~~~~~^~~~~~~~~~~~
|
s486551150 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long s=1;
cin >> N;
for (int i = 1; i <= N; i++) {
s *= i;
}
cout << s%=1000000007;;
}
| a.cc: In function 'int main()':
a.cc:15:14: error: no match for 'operator%=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int')
15 | cout << s%=1000000007;;
| ~~~~~~~~~~~~^~~~~~~~~~~~
|
s410156232 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
ll n;
ans=1;
cin>>n;
for(int i=1; i<=n; i++){
ans*=i;
ans%=1000000007;
}
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
8 | ans=1;
| ^~~
| abs
|
s625688348 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int N;
cin >> N;
long int power = 1;
int a = 1000000007;
for (int i=1; i <= N; i++) {
power = power * i % 1
}
cout << power << endl;
} | a.cc: In function 'int main()':
a.cc:11:30: error: expected ';' before '}' token
11 | power = power * i % 1
| ^
| ;
12 | }
| ~
|
s944013026 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int x
for (int i=1; i <= N; i++) {
x = i * x % 109 + 7;
}
cout << x << endl;
}
| a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'for'
9 | for (int i=1; i <= N; i++) {
| ^~~
a.cc:9:19: error: 'i' was not declared in this scope
9 | for (int i=1; i <= N; i++) {
| ^
a.cc:12:13: error: 'x' was not declared in this scope
12 | cout << x << endl;
| ^
|
s622192387 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int j = 1;
for (int i=1; i <= N; i++) {
if (N==1) cout << 1 << endl; break;
int total = i * j + j;
j = total;
}
cout << total << endl;
}
| a.cc: In function 'int main()':
a.cc:15:13: error: 'total' was not declared in this scope
15 | cout << total << endl;
| ^~~~~
|
s289064478 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int j = 1;
for (i=1; i <= N; i++) {
if (N==1) cout << 1 << endl; break;
int total = i * j + j;
if (i == N) cout << total << endl;
j = total;
}
} | a.cc: In function 'int main()':
a.cc:9:10: error: 'i' was not declared in this scope
9 | for (i=1; i <= N; i++) {
| ^
|
s146374333 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
j = 1;
for (i=1; i <= N; i++) {
if (N==1) cout << 1 << endl; break;
int total = i * j + j;
if (i == N) cout << total << endl;
int j = total;
}
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'j' was not declared in this scope
8 | j = 1;
| ^
a.cc:9:10: error: 'i' was not declared in this scope
9 | for (i=1; i <= N; i++) {
| ^
|
s414942698 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
j = 1;
for (i=1; i <= N; i++) {
if (N==1) cout << 1 << endl;
int total = i * j + j;
if (i == N) cout << total << endl;
int j = total;
}
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'j' was not declared in this scope
8 | j = 1;
| ^
a.cc:9:10: error: 'i' was not declared in this scope
9 | for (i=1; i <= N; i++) {
| ^
|
s855109550 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
j = 1
for (i=1; i <= N; i++) {
if (N==1) cout << 1 << endl;
int total = i * j + j;
if (i == N) cout << total << endl;
int j = total;
}
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'j' was not declared in this scope
8 | j = 1
| ^
a.cc:9:15: error: 'i' was not declared in this scope
9 | for (i=1; i <= N; i++) {
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.