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
| from PIL import Image | |
| Haba=4 | |
| def pic(a): | |
| if(a==0):return 1 | |
| if(a!=1):return pic(a-1)*2+1 | |
| else:return 2 | |
| def turn(a): | |
| res=1 |
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
| from decimal import getcontext , Decimal | |
| from math import sqrt | |
| def root(a): | |
| x=Decimal(sqrt(a)) | |
| y=Decimal(0) | |
| while(abs(x-y)>Decimal(0.1)**(getcontext().prec-1)): | |
| x,y=x-(x*x-a)/(2*x),x | |
| return 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
| A[100],B[100],M,C,W,j;int main(i){for(gets(&M);~scanf("%d%d%d",&M,&C,&W);printf("Case #%d: %d\n",i++,W+1)){for(j=0;j<C;j++)scanf("%d%d",&A[j],&B[j]);for(W--,j=C-1;j+1;j--)W=W<A[j]+B[j]-1?W<B[j]?W=A[j]+W-1:W-B[j]:W;}} |
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<stdio.h> | |
| int main(){ | |
| int T,M,C,W,i,j; | |
| scanf("%d",&T); | |
| for(i=1;i<=T;i++){ | |
| scanf("%d%d%d",&M,&C,&W); | |
| int A[100],B[100]; | |
| for(int j=0;j<C;j++){ | |
| scanf("%d%d",&A[j],&B[j]); |
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
| main(a,b){b=0;for(;a<=9;(b%=9)||a++)printf("%dx%d=%d\n",a,++b,a*b+a);} |
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
| main(a,b){for(;a<=9;a++)for(b=1;b<=9;b++)printf("%dx%d=%d\n",a,b,a*b);} |
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
| main(a,b){for(a=1;a<=9;a++)for(b=1;b<=9;b++)printf("%dx%d=%d\n",a,b,a*b);return 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<stdio.h> | |
| int main(){ | |
| int a,b; | |
| for(a=1;a<=9;a++){ | |
| for(b=1;b<=9;b++){ | |
| printf("%dx%d=%d\n",a,b,a*b); | |
| } | |
| } | |
| return 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
| from __future__ import division | |
| import decimal | |
| decimal.getcontext().prec = 100 | |
| dd=decimal.Decimal | |
| def newton(x): | |
| xn=dd(0) | |
| while True: | |
| xn+=1 |
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 decimal | |
| decimal.getcontext().prec = 100 | |
| dd=decima.Decimal | |
| def pi(x): | |
| xx=dd(1) | |
| xt=0 | |
| for a in range(x): | |
| xt+=dd(4)/xx | |
| xt*=dd(-1) | |
| xx+=dd(2) |