惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

博客园 - 啊不才

【转载备用】Linux内核编译 幸运的Windows 7 Party 社区活动 jQueryinAction学习笔记——01 - 啊不才 - 博客园 django的字符替换问题 如何在屏幕中央打开一个特定的窗口 KB937061和KB947738多次安装问题 BlogEngine.Net的皮肤 [How Do I]系列学习笔记——001:学习一些技巧 继承类中override和new的区别 『框架设计(第2版)CLR Via C#』学习笔记——使用is和as操作符来进行强制类型转换 调用Master页面上的属性 NotePad++很好用,但是我真的不想再用它了 BlogEngine的SQL Server数据库配置 关于asp:ScriptManager与Script代码块的位置关系问题 NHiBernate学习笔记(1) 使用JMail.NET时遇到的问题 ToString()方法与Convert.ToString()的差异 『框架设计(第2版)CLR Via C#』学习笔记——常量 【已解决,看后文】使用BlogEngine.net的扩展插件Silverlight Player Extension遇到的问题
我提交的ACM题库的答案
啊不才 · 2008-07-05 · via 博客园 - 啊不才

最近园子里流行做俄罗斯乌拉尔大学在线题库我也就做了一下,下面是1000题和1001题的代码:
Problem 1000:

1int main()
2{
3    int a, b;
4    clrscr();
5    scanf("%d %d"&a, &b);
6    printf("%d", a+b);
7}

Problem 1001:

 1using System;
 2using System.Threading;
 3using System.Globalization;
 4
 5namespace ConsoleApplication4
 6{
 7    class Program
 8    {
 9        static void Main(string[] args)
10        {
11            // 注意下面一行代码,如果少了的话,你永远也通过不了,哈哈
12            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
13            string[] inputArray = Console.In.ReadToEnd().Split();
14            for (int i = inputArray.Length - 1; i >= 0; i--)
15            {
16                if (!String.IsNullOrEmpty(inputArray[i]))
17                {
18                    Console.WriteLine("{0:F4}", Math.Sqrt(Convert.ToDouble(inputArray[i])));
19                }

20            }

21        }

22    }

23}

原因是什么,在这里有人解释了,注意看回复的第二楼。