This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| # Your code here! | |
| def f(x, y): | |
| return x + y | |
| def euler(dx, x, y): | |
| return y + dx * f(x, y) | |
| def improve_euler(dx, x, y): | |
| return y + 0.5*dx * (f(x, y) + f(x+dx, euler(dx, x, y))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| #input | |
| N = int(input()) | |
| index = [i for i in range(N)] | |
| mat = [] | |
| for i in index: | |
| tmp = input().split(" ") | |
| tmp = list(map(float, tmp)) | |
| mat.append(tmp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| #include <vector> | |
| #include <cstdlib> | |
| #include <cmath> | |
| using namespace std; | |
| #define outVec(v) for(int i = 0; i < (v).size() - 1; ++i){ cout << (v)[i] << " "; } cout << (v)[v.size() - 1]; cout << endl | |
| #define debug(x) cout<<#x<<": "<<x<<endl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class Main { | |
| public static double f(double x) { | |
| return x*x + x - 6; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JSであそぼ - 基本</title> | |
| </head> | |
| <body> | |
| <h1>jsであそぼ</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*-coding: utf-8 -*- | |
| #Hello world | |
| print("Hello, python.") | |
| #四則演算 | |
| print(1 + 1) | |
| print(33 - 4) | |
| print(4 * 6) | |
| print(81 / 9) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <cmath> | |
| using namespace std; | |
| double f(double x){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| def f(x): | |
| return x**3 - 3*(x**2) + 9*x - 8 | |
| def df(x): | |
| return 3*(x**2) - 6*x + 9 | |
| if __name__ == '__main__': | |
| x = [5] | |
| x.append(x[0] - f(x[0])/df(x[0])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| #include <vector> | |
| #include <cstdio> | |
| #define output(x) cout << (x) << endl | |
| #define debug(x) cout<<#x<<": "<<x<<endl | |
| using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| #include <vector> | |
| using namespace std; | |
| #define outVec(v) for(int f7bv3d72gsq = 0; f7bv3d72gsq < (v).size() - 1; ++f7bv3d72gsq){ cout << (v)[f7bv3d72gsq] << " "; } cout << (v)[v.size() - 1]; cout << endl | |
| #define outVec2(v) for(int d366dv2s6cbz = 0; d366dv2s6cbz < (v).size(); ++d366dv2s6cbz){ outVec((v)[d366dv2s6cbz]); } bool throwingPiece | |
| int main() |
NewerOlder