問題鏈接:http://www.spoj.com/problems/LASTDIG2/ 模式的想法:https://brilliant.org/wiki/finding-the-last-digit-of-a-power/ #include <iostream>
using namespace std;
int t , n ;unsigned long long m;
print("\n\nThis is a basic program to find the letter grade for a student.")
student = input("What is the students name? : ")
test1 = input("What is the first test grade " + student.capitalize() + "
我將使用數學庫對數組進行一些計算。 我想是這樣的: import numpy as np
import math
a = np.array([0, 1, 2, 3])
a1 = np.vectorize(a)
print("sin(a) = \n", math.sin(a1))
遺憾的是它不工作。發生錯誤:"TypeError: must be real number, not vec