首页 > 编程语言 > 详细

用python做oj上的简单题(持续更新中.......)

时间:2014-10-13 12:52:09      阅读:408      评论:0      收藏:0      [点我收藏+]

本人刚开始接触python,在oj上解一些简单的题,欢迎交流,不喜勿喷.

OJ地址链接:acm.sdut.edu.cn


http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1110&cid=1278

#!/usr/bin/env python
# coding=utf-8

print 'Hello World!'

http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1000

#!/usr/bin/env python
# coding=utf-8

a=raw_input().split()
print int(a[0])+int(a[1])

http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1111&cid=1278

#!/usr/bin/env python
# coding=utf-8

print '100'
print 'A'
print '3.140000'


http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1117&cid=1279

#!/usr/bin/env python
# coding=utf-8

x = input()
print abs(x)

http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1115&cid=1279

#!/usr/bin/env python
# coding=utf-8

x = raw_input().split()
print x[1],x[0]


http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1208&cid=1279

#!/usr/bin/env python
# coding=utf-8

f = input()
c = 5*(f - 32)/9

print ("%.2f"% c)

http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1116&cid=1279

#!/usr/bin/env python
# coding=utf-8

import string

x = raw_input()
print x.upper()



用python做oj上的简单题(持续更新中.......)

原文:http://blog.csdn.net/u013634961/article/details/40041691

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!