# String Manipulation# Output Formatting

a784 - 6. PERLs Before Swine

🔗 前往 ZeroJudge 原題

題目描述

題目要求輸出指定的字串,該字串模擬了 Larry Wall 發明的 PERL 語言的條件敘述風格。輸入不影響輸出,程式只需要按照題目要求輸出固定的字串即可。

解題思路

此題為一個純粹的輸出題目。程式不需要進行任何計算或邏輯判斷,只需要將題目中提供的字串輸出到標準輸出即可。使用 printf 函數可以方便地輸出字串。

複雜度分析

  • 時間複雜度: O(1)
  • 空間複雜度: O(1)

程式碼

#include <stdio.h> 
int main(){
	int a;
	scanf("%d",&a);
	printf("min = a if( a < min );\nr0 = - b*c - sqrt( 3*a - c*c/17 ) if( 4*a*c - b*b < 32*c + 9 );\n c /= 2 if( c+3*a < log(9*b) );\nperl = smart if( 1 == 2 );\n");
	return 0;
}

Discussion