引越しのお知らせ

id:hatoneが欲しいid:hatyoneです。 はてなブログの方へお引越ししました。 メモりメモる

バナナの謎はまだ謎なのだぞ

#include<iostream> #include<math.h> #define M_PI 3.14159265358979323846 using namespace std; int main(){ int ans =0; int n=0; int m=0; while(1){ cin >> n; cout<<n; if(n==0)break; int oreA[10][2]; // answer cin >> m; for(int j=0; j<m; j++) { cin >>oreA[j][0]; cin >>oreA[j][1]; } // hoka for(int i=0; …</m;></n;></math.h></iostream>

16問目

未確認。あんさいんどろんぐろんぐなので後でとく。 #include<iostream> using namespace std; int main(){ unsigned long long int p=1; unsigned long long int n=0; for(int i=0;i<1000;i++) { p*=2; } cout<<p<<endl; while(p>0) { n+= p%10; p/=10; cout<</p<<endl;></iostream>

14問目

#include<iostream> using namespace std; int main(){ unsigned long int max=0; unsigned long int maxans=0; unsigned long int p=0; unsigned long int count=0; for(unsigned long int i=999999;i>=0;i--) { count=0; p=i; while(p!=1) { if(p%2==0) { p=p/2; cou</iostream>…

13問目

#include<iostream> using namespace std; int main(){ int num[100][50]; int buf[50]; int mod[50]; int ans[50]; char c; for(int i=0;i<100;i++) { for(int p=0;p<50;p++) { cin>>c; num[i][p]=c-'0'; buf[p]=0; mod[p]=0; ans[p]=0; } } for(int i=0;i<50;i++) { </iostream>…

12問目

#include <iostream> #include <math.h> using namespace std; int main(){ int sq=0; int count=0; int prv=0; for(long long int i=1;i<100000000000000000;i++) { sq+=i; if( sqrt((double)sq) - floor(sqrt((double)sq))==0.0) count--; for(int n=1; n<=sq; n++ ) { if(sq</math.h></iostream>…

11問目

斜めって2方向あるんですよ奥さん。 In the 2020 grid below, four numbers along a diagonal line have been marked in red.08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81…

第10問

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million. #include <iostream> #include <math.h> using namespace std; long long int prime[1000000]; long long int table[100000000]; int primeCall(){ int flag=0; prim</math.h></iostream>…

8問目。

Find the greatest product of five consecutive digits in the 1000-digit number.73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698…

7問目。

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.What is the 10001st prime number? #include <iostream> using namespace std; long long int primeCall(unsigned int NM){ long long int prime[50000]; long</iostream>…

6問目。

The sum of the squares of the first ten natural numbers is,1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is,(1 + 2 + ... + 10)^2 = 552 = 3025 Hence the difference between the sum of the squares of the …

5問目。

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.What is the smallest number that is evenly divisible by all of the numbers from 1 to 20? #include <iostream> using namespace std; int main() { </iostream>…

4問目。

A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91*99.Find the largest palindrome made from the product of two 3-digit numbers. #include <iostream> using namespace std; int</iostream>…

第2問

#include <iostream> #include <time.h> using namespace std; int main() { unsigned long long int l=0; unsigned long long int r=1; unsigned long long int m=0; unsigned long int ans =0; for(long long int i=0;i<=4000000;i++){ if(m>4000000)break; m=l+r; //cout<</time.h></iostream>

3問目。

効率が悪いし、最悪の場合の処理時間がΟ(n^2)。 効率のよい実装をもちょっと考えれるようになりたいです。 #include <iostream> #include <time.h> using namespace std; unsigned int primeCall(unsigned NM){ unsigned int prime[50000]; unsigned int box[100000]; unsigned</time.h></iostream>…

breakにつまづく。

深夜にソースを書いちゃダメーっ! 3問目を解こうと、エラトステネスのふるいを実装しようと試みてちょっと挫折気味。 #include <iostream> #include <time.h> using namespace std; int erasto(int NM){ int n[50]; int box[100000]; int ans=0; int p=0; for(p=0;p<50;p++)n[</time.h></iostream>…

2問目。足りない。。

未だできてないけど。 Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...Find the sum of all the even-valued term…

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.Find the sum of all the multiples of 3 or 5 below 1000. #include <iostream> #include <time.h> using namespace std; int main() { </time.h></iostream>…

絶対値を求める。 d=d stringstreamからstringへ ss.str();忘れないように気を付ける。

大自然

大学へブーニンを散歩させにいきました。 函館の街と山をバックにいい感じです。 写真に写ってるのは@butibutiさん。

はてなのインターンに応募しました。

今日は七夕なので、短冊に「京都行けますように!!」と書きました。 やりたいこと、今までやってきたことを見直す良い機会になったと思います。 結果は来週くらいらしいです。

二進数時計

igoogle用ガジェットとして、二進数時計を公開しました。 実際、自分でも瞬時には時刻を読めません。

<html> <head> <title>サンプル</title> <script type="text/javascript"> </head></html>

天下一プログラマー。

二問目は簡単だったようなきがする。

メモ

研究室のPCのfirefoxの設定について about:configのbrowser.search.openintabをtureにする。 FireGestures Gspace

時計っぽい何か。

大人の科学マガジン Vol.24 (4ビットマイコン) (Gakken Mook)作者: 大人の科学マガジン編集部出版社/メーカー: 学習研究社発売日: 2009/07/01メディア: ムック購入: 11人 クリック: 226回この商品を含むブログ (38件) を見るこの本をみっけたので、早速買っ…

アドエスでノブレス携帯

rltodayをカスタマイズしまくりました。

自作電池式USBバッテリーパック

百円均一のケーブルと、秋月?の電池ケースでUSB充電器を作りました。 PSPとadesが充電可能です。 iPodは、データの部分にも電気流さなきゃいけないみたいなので、充電できませんでした。

再開。

久しぶりに一日一撮を再開してみる。 今日は、海岸線沿いのレストランにパスタを食べに行ってきました。

普通じゃない勉強会へ参加してきました。

正確には、コンピュータビジョン・拡張現実感に関する普通じゃない勉強会2.0です。 オープニング&スペシャルトークセッション ポストペットの人が来ていた事に大感動です。 でも、サインもらいそびれましたが。。。改めて、拡張現実と拡張現実感の厳密的な…