結果
問題 | No.153 石の山 |
ユーザー |
|
提出日時 | 2018-04-03 20:27:10 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 568 bytes |
コンパイル時間 | 143 ms |
コンパイル使用メモリ | 31,744 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 08:34:09 |
合計ジャッジ時間 | 991 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
program mainimplicit noneinteger::ninteger::a(100)integer::i,j,k,x,y,r,p,q,tmpread*,na(1)=0a(2)=1do i=3,nx=xor(a(i/2),a(i-i/2))if(mod(i,3)==0.or.mod(i,3)==2)theny=a(i/3)else if(mod(i,3)==1)theny=a(i/3+1)end ifif(x/=0.and.y/=0)thena(i)=0else if(x/=1.and.y/=1)thena(i)=1elsea(i)=2end ifend doif(a(n)==0)thenprint*,"B"elseprint*,"A"end ifend program